diff --git a/src/drivers/cratesio.rs b/src/drivers/cratesio.rs index 28a157ca..eb47a6b0 100644 --- a/src/drivers/cratesio.rs +++ b/src/drivers/cratesio.rs @@ -65,7 +65,6 @@ pub async fn fetch_crate_cratesio( download_tar_based_and_visit( Url::parse(&crate_url)?, TarBasedFmt::Tgz, - &temp_dir, ManifestVisitor::new(manifest_dir_path), ) .await? diff --git a/src/helpers.rs b/src/helpers.rs index a4899bf9..0667383c 100644 --- a/src/helpers.rs +++ b/src/helpers.rs @@ -91,27 +91,22 @@ pub async fn download_and_extract>( /// /// * `filter` - If Some, then it will pass the path of the file to it /// and only extract ones which filter returns `true`. -pub async fn download_tar_based_and_visit< - V: TarEntriesVisitor + Debug + Send + 'static, - P: AsRef, ->( +pub async fn download_tar_based_and_visit( url: Url, fmt: TarBasedFmt, - path: P, visitor: V, ) -> Result { debug!("Downloading from: '{url}'"); let resp = create_request(url).await?; - let path = path.as_ref(); - debug!("Downloading to file: '{}'", path.display()); + debug!("Downloading and extracting then in-memory processing"); let stream = resp.bytes_stream(); let visitor = extract_tar_based_stream_and_visit(stream, fmt, visitor).await?; - debug!("Download OK, written to file: '{}'", path.display()); + debug!("Download, extraction and in-memory procession OK"); Ok(visitor) }