From ae203f998a4c003c18a78a9c5d372c710a57b14b Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 30 Oct 2023 18:19:27 -0700 Subject: [PATCH] Rename `Unzipper#download` to `Unzipper#unzip` (#247) --- crates/puffin-cli/src/commands/pip_sync.rs | 2 +- crates/puffin-dispatch/src/lib.rs | 2 +- crates/puffin-installer/src/unzipper.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/puffin-cli/src/commands/pip_sync.rs b/crates/puffin-cli/src/commands/pip_sync.rs index acdbe6ecf..fc01860ae 100644 --- a/crates/puffin-cli/src/commands/pip_sync.rs +++ b/crates/puffin-cli/src/commands/pip_sync.rs @@ -176,7 +176,7 @@ pub(crate) async fn sync_requirements( .with_reporter(UnzipReporter::from(printer).with_length(downloads.len() as u64)); let unzips = unzipper - .download(downloads, cache.unwrap_or(staging.path())) + .unzip(downloads, cache.unwrap_or(staging.path())) .await .context("Failed to download and unpack wheels")?; diff --git a/crates/puffin-dispatch/src/lib.rs b/crates/puffin-dispatch/src/lib.rs index 5aa90af52..57ac86215 100644 --- a/crates/puffin-dispatch/src/lib.rs +++ b/crates/puffin-dispatch/src/lib.rs @@ -163,7 +163,7 @@ impl BuildContext for BuildDispatch { downloads.iter().map(ToString::to_string).join(", ") ); Unzipper::default() - .download(downloads, self.cache.as_deref().unwrap_or(staging.path())) + .unzip(downloads, self.cache.as_deref().unwrap_or(staging.path())) .await .context("Failed to unpack build dependencies")? }; diff --git a/crates/puffin-installer/src/unzipper.rs b/crates/puffin-installer/src/unzipper.rs index b1dff00d0..ef6192ba2 100644 --- a/crates/puffin-installer/src/unzipper.rs +++ b/crates/puffin-installer/src/unzipper.rs @@ -29,8 +29,8 @@ impl Unzipper { } } - /// Install a set of wheels into a Python virtual environment. - pub async fn download( + /// Unzip a set of downloaded wheels. + pub async fn unzip( &self, downloads: Vec, target: &Path, @@ -93,7 +93,7 @@ impl Unzipper { } } -/// Write a wheel into the target directory. +/// Unzip a wheel into the target directory. fn unzip_wheel(wheel: InMemoryDistribution, target: &Path) -> Result<()> { // Read the wheel into a buffer. let reader = std::io::Cursor::new(wheel.buffer);