mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-22 13:38:43 +00:00
Bump async_zip from 0.0.12 to 0.0.13 (#949)
* Bump async_zip from 0.0.12 to 0.0.13 Bumps [async_zip](https://github.com/Majored/rs-async-zip) from 0.0.12 to 0.0.13. - [Release notes](https://github.com/Majored/rs-async-zip/releases) - [Commits](https://github.com/Majored/rs-async-zip/commits) --- updated-dependencies: - dependency-name: async_zip dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * Fix compilation Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
4af092f848
commit
875747f7ef
4 changed files with 17 additions and 9 deletions
9
Cargo.lock
generated
9
Cargo.lock
generated
|
@ -68,6 +68,7 @@ dependencies = [
|
|||
"bzip2",
|
||||
"flate2",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"memchr",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
|
@ -89,16 +90,18 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "async_zip"
|
||||
version = "0.0.12"
|
||||
version = "0.0.13"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b2105142db9c6203b9dadc83b0553394589a6cb31b1449a3b46b42f47c3434d0"
|
||||
checksum = "79eaa2b44cfdce59cfff6cb013c96900635085fe7c28fbcbe926c9e5ad0ddfbc"
|
||||
dependencies = [
|
||||
"async-compression",
|
||||
"crc32fast",
|
||||
"futures-util",
|
||||
"log",
|
||||
"pin-project",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tokio-util",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -201,6 +204,7 @@ dependencies = [
|
|||
"digest",
|
||||
"flate2",
|
||||
"futures-lite",
|
||||
"futures-util",
|
||||
"generic-array",
|
||||
"httpdate",
|
||||
"reqwest",
|
||||
|
@ -2459,6 +2463,7 @@ checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2"
|
|||
dependencies = [
|
||||
"bytes",
|
||||
"futures-core",
|
||||
"futures-io",
|
||||
"futures-sink",
|
||||
"pin-project-lite",
|
||||
"tokio",
|
||||
|
|
|
@ -12,7 +12,7 @@ license = "GPL-3.0"
|
|||
[dependencies]
|
||||
async-trait = "0.1.68"
|
||||
async-compression = { version = "0.3.15", features = ["gzip", "zstd", "xz", "bzip2", "tokio"] }
|
||||
async_zip = { version = "0.0.12", features = ["deflate", "bzip2", "lzma", "zstd", "xz"] }
|
||||
async_zip = { version = "0.0.13", features = ["deflate", "bzip2", "lzma", "zstd", "xz", "tokio"] }
|
||||
binstalk-types = { version = "0.3.0", path = "../binstalk-types" }
|
||||
bytes = "1.4.0"
|
||||
bzip2 = "0.4.4"
|
||||
|
@ -20,6 +20,7 @@ compact_str = "0.7.0"
|
|||
digest = "0.10.6"
|
||||
flate2 = { version = "1.0.25", default-features = false }
|
||||
futures-lite = { version = "1.12.0", default-features = false }
|
||||
futures-util = "0.3.27"
|
||||
generic-array = "0.14.6"
|
||||
httpdate = "1.0.2"
|
||||
reqwest = { version = "0.11.15", features = ["stream", "gzip", "brotli", "deflate"], default-features = false }
|
||||
|
|
|
@ -6,7 +6,7 @@ use std::{
|
|||
path::{Component, Path, PathBuf},
|
||||
};
|
||||
|
||||
use async_zip::read::stream::ZipFileReader;
|
||||
use async_zip::tokio::read::stream::ZipFileReader;
|
||||
use bytes::{Bytes, BytesMut};
|
||||
use futures_lite::stream::Stream;
|
||||
use tokio::sync::mpsc;
|
||||
|
|
|
@ -3,14 +3,16 @@ use std::{
|
|||
path::{Component, Path, PathBuf},
|
||||
};
|
||||
|
||||
use async_zip::read::stream::{Reading, ZipFileReader};
|
||||
use async_zip::{base::read::stream::Reading, tokio::read::stream::ZipFileReader};
|
||||
use bytes::{Bytes, BytesMut};
|
||||
use futures_lite::future::try_zip as try_join;
|
||||
use futures_util::io::Take;
|
||||
use thiserror::Error as ThisError;
|
||||
use tokio::{
|
||||
io::{AsyncRead, AsyncReadExt, Take},
|
||||
io::{AsyncRead, AsyncReadExt},
|
||||
sync::mpsc,
|
||||
};
|
||||
use tokio_util::compat::{Compat, FuturesAsyncReadCompatExt};
|
||||
|
||||
use super::{DownloadError, ExtractedFiles};
|
||||
use crate::utils::asyncify;
|
||||
|
@ -35,7 +37,7 @@ impl ZipError {
|
|||
}
|
||||
|
||||
pub(super) async fn extract_zip_entry<R>(
|
||||
zip_reader: &mut ZipFileReader<Reading<'_, Take<R>>>,
|
||||
zip_reader: &mut ZipFileReader<Reading<'_, Take<Compat<R>>>>,
|
||||
path: &Path,
|
||||
buf: &mut BytesMut,
|
||||
extracted_files: &mut ExtractedFiles,
|
||||
|
@ -113,7 +115,7 @@ where
|
|||
Ok(())
|
||||
});
|
||||
|
||||
let read_task = copy_file_to_mpsc(zip_reader.reader(), tx, buf);
|
||||
let read_task = copy_file_to_mpsc(zip_reader.reader().compat(), tx, buf);
|
||||
|
||||
try_join(
|
||||
async move { write_task.await.map_err(From::from) },
|
||||
|
@ -131,7 +133,7 @@ where
|
|||
}
|
||||
|
||||
async fn copy_file_to_mpsc<R: AsyncRead>(
|
||||
entry_reader: &mut R,
|
||||
mut entry_reader: R,
|
||||
tx: mpsc::Sender<Bytes>,
|
||||
buf: &mut BytesMut,
|
||||
) -> Result<(), async_zip::error::ZipError>
|
||||
|
|
Loading…
Add table
Reference in a new issue