diff --git a/Cargo.lock b/Cargo.lock index 2c1fad471..773a76b35 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3876,9 +3876,9 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.19.1" +version = "3.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "e8a64e3985349f2441a1a9ef0b853f869006c3855f2cda6862a94d26ebb9d6a1" dependencies = [ "fastrand", "getrandom 0.3.1", diff --git a/crates/uv-distribution/src/distribution_database.rs b/crates/uv-distribution/src/distribution_database.rs index cd3196cd1..0ecea36e6 100644 --- a/crates/uv-distribution/src/distribution_database.rs +++ b/crates/uv-distribution/src/distribution_database.rs @@ -602,7 +602,7 @@ impl<'a, Context: BuildContext> DistributionDatabase<'a, Context> { let id = self .build_context .cache() - .persist(temp_dir.into_path(), wheel_entry.path()) + .persist(temp_dir.keep(), wheel_entry.path()) .await .map_err(Error::CacheRead)?; @@ -773,7 +773,7 @@ impl<'a, Context: BuildContext> DistributionDatabase<'a, Context> { let id = self .build_context .cache() - .persist(temp_dir.into_path(), wheel_entry.path()) + .persist(temp_dir.keep(), wheel_entry.path()) .await .map_err(Error::CacheRead)?; @@ -934,7 +934,7 @@ impl<'a, Context: BuildContext> DistributionDatabase<'a, Context> { let id = self .build_context .cache() - .persist(temp_dir.into_path(), wheel_entry.path()) + .persist(temp_dir.keep(), wheel_entry.path()) .await .map_err(Error::CacheWrite)?; @@ -982,7 +982,7 @@ impl<'a, Context: BuildContext> DistributionDatabase<'a, Context> { let id = self .build_context .cache() - .persist(temp_dir.into_path(), target) + .persist(temp_dir.keep(), target) .await .map_err(Error::CacheWrite)?; diff --git a/crates/uv-distribution/src/source/mod.rs b/crates/uv-distribution/src/source/mod.rs index 18bac0010..7a92d700f 100644 --- a/crates/uv-distribution/src/source/mod.rs +++ b/crates/uv-distribution/src/source/mod.rs @@ -2136,7 +2136,7 @@ impl<'a, T: BuildContext> SourceDistributionBuilder<'a, T> { // Extract the top-level directory. let extracted = match uv_extract::strip_component(temp_dir.path()) { Ok(top_level) => top_level, - Err(uv_extract::Error::NonSingularArchive(_)) => temp_dir.into_path(), + Err(uv_extract::Error::NonSingularArchive(_)) => temp_dir.keep(), Err(err) => { return Err(Error::Extract( temp_dir.path().to_string_lossy().into_owned(), diff --git a/crates/uv-python/src/downloads.rs b/crates/uv-python/src/downloads.rs index fcc39691a..9b7fc2825 100644 --- a/crates/uv-python/src/downloads.rs +++ b/crates/uv-python/src/downloads.rs @@ -798,7 +798,7 @@ impl ManagedPythonDownload { // Extract the top-level directory. let mut extracted = match uv_extract::strip_component(temp_dir.path()) { Ok(top_level) => top_level, - Err(uv_extract::Error::NonSingularArchive(_)) => temp_dir.into_path(), + Err(uv_extract::Error::NonSingularArchive(_)) => temp_dir.keep(), Err(err) => return Err(Error::ExtractError(filename.to_string(), err)), }; diff --git a/crates/uv/src/commands/project/environment.rs b/crates/uv/src/commands/project/environment.rs index 62cd5060e..f7ba006c5 100644 --- a/crates/uv/src/commands/project/environment.rs +++ b/crates/uv/src/commands/project/environment.rs @@ -117,9 +117,7 @@ impl CachedEnvironment { .await?; // Now that the environment is complete, sync it to its content-addressed location. - let id = cache - .persist(temp_dir.into_path(), cache_entry.path()) - .await?; + let id = cache.persist(temp_dir.keep(), cache_entry.path()).await?; let root = cache.archive(&id); Ok(Self(PythonEnvironment::from_root(root, cache)?))