Remove some unnecessary Interpreter clones (#3999)
This commit is contained in:
@@ -135,13 +135,13 @@ mod resolver {
|
||||
let index = InMemoryIndex::default();
|
||||
let index_locations = IndexLocations::default();
|
||||
let installed_packages = EmptyInstalledPackages;
|
||||
let interpreter = venv.interpreter().clone();
|
||||
let python_requirement = PythonRequirement::from_marker_environment(&interpreter, &MARKERS);
|
||||
let interpreter = venv.interpreter();
|
||||
let python_requirement = PythonRequirement::from_marker_environment(interpreter, &MARKERS);
|
||||
|
||||
let build_context = BuildDispatch::new(
|
||||
client,
|
||||
&cache,
|
||||
&interpreter,
|
||||
interpreter,
|
||||
&index_locations,
|
||||
&flat_index,
|
||||
&index,
|
||||
|
||||
@@ -207,7 +207,7 @@ pub(crate) async fn pip_install(
|
||||
}
|
||||
}
|
||||
|
||||
let interpreter = venv.interpreter().clone();
|
||||
let interpreter = venv.interpreter();
|
||||
|
||||
// Determine the tags, markers, and interpreter to use for resolution.
|
||||
let tags = match (python_platform, python_version.as_ref()) {
|
||||
@@ -310,7 +310,7 @@ pub(crate) async fn pip_install(
|
||||
let resolve_dispatch = BuildDispatch::new(
|
||||
&client,
|
||||
&cache,
|
||||
&interpreter,
|
||||
interpreter,
|
||||
&index_locations,
|
||||
&flat_index,
|
||||
&index,
|
||||
@@ -348,7 +348,7 @@ pub(crate) async fn pip_install(
|
||||
&hasher,
|
||||
&reinstall,
|
||||
&upgrade,
|
||||
&interpreter,
|
||||
interpreter,
|
||||
&tags,
|
||||
Some(&markers),
|
||||
&client,
|
||||
@@ -383,7 +383,7 @@ pub(crate) async fn pip_install(
|
||||
BuildDispatch::new(
|
||||
&client,
|
||||
&cache,
|
||||
&interpreter,
|
||||
interpreter,
|
||||
&index_locations,
|
||||
&flat_index,
|
||||
&index,
|
||||
|
||||
@@ -92,7 +92,7 @@ pub(super) async fn do_lock(
|
||||
let project_name = project.project_name().clone();
|
||||
|
||||
// Determine the tags, markers, and interpreter to use for resolution.
|
||||
let interpreter = venv.interpreter().clone();
|
||||
let interpreter = venv.interpreter();
|
||||
let tags = venv.interpreter().tags()?;
|
||||
let markers = venv.interpreter().markers();
|
||||
|
||||
@@ -131,7 +131,7 @@ pub(super) async fn do_lock(
|
||||
let build_dispatch = BuildDispatch::new(
|
||||
&client,
|
||||
cache,
|
||||
&interpreter,
|
||||
interpreter,
|
||||
index_locations,
|
||||
&flat_index,
|
||||
&index,
|
||||
@@ -160,7 +160,7 @@ pub(super) async fn do_lock(
|
||||
&hasher,
|
||||
&reinstall,
|
||||
&upgrade,
|
||||
&interpreter,
|
||||
interpreter,
|
||||
tags,
|
||||
None,
|
||||
&client,
|
||||
|
||||
@@ -149,7 +149,7 @@ pub(crate) async fn update_environment(
|
||||
}
|
||||
|
||||
// Determine the tags, markers, and interpreter to use for resolution.
|
||||
let interpreter = venv.interpreter().clone();
|
||||
let interpreter = venv.interpreter();
|
||||
let tags = venv.interpreter().tags()?;
|
||||
let markers = venv.interpreter().markers();
|
||||
|
||||
@@ -187,7 +187,7 @@ pub(crate) async fn update_environment(
|
||||
let resolve_dispatch = BuildDispatch::new(
|
||||
&client,
|
||||
cache,
|
||||
&interpreter,
|
||||
interpreter,
|
||||
index_locations,
|
||||
&flat_index,
|
||||
&index,
|
||||
@@ -216,7 +216,7 @@ pub(crate) async fn update_environment(
|
||||
&hasher,
|
||||
&reinstall,
|
||||
&upgrade,
|
||||
&interpreter,
|
||||
interpreter,
|
||||
tags,
|
||||
Some(markers),
|
||||
&client,
|
||||
@@ -245,7 +245,7 @@ pub(crate) async fn update_environment(
|
||||
BuildDispatch::new(
|
||||
&client,
|
||||
cache,
|
||||
&interpreter,
|
||||
interpreter,
|
||||
index_locations,
|
||||
&flat_index,
|
||||
&index,
|
||||
|
||||
Reference in New Issue
Block a user