8000 Update `async_zip` to 0.0.17 by lafrenierejm · Pull Request #281 · phiresky/ripgrep-all · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Update async_zip to 0.0.17 #281

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lafrenierejm
Copy link
Contributor

Updating this dependency is a prerequisite for #258.

@lafrenierejm
Copy link
Contributor Author

@phiresky Any suggestions for how best to resolve the type errors?

$ cargo build
error[E0277]: the trait bound `ZipEntryReader<'_, Compat<tokio::io::BufReader<tokio::fs::File>>, WithoutEntry>: tokio::io::AsyncRead` is not satisfied
  --> src/adapters/zip.rs:92:31
   |
92 | ...                   >(reader)
   |                         ^^^^^^ the trait `tokio::io::AsyncRead` is not implemented for `ZipEntryReader<'_, Compat<tokio::io::BufReader<tokio::fs::File>>, WithoutEntry>`
   |
   = help: the following other types implement trait `tokio::io::AsyncRead`:
             &[u8]
             &mut T
             Archive<R>
             Box<T>
             BufStream<RW>
             Compat<T>
             DuplexStream
             Either<L, R>
           and 67 others
   = note: required for the cast from `std::pin::Pin<&mut ZipEntryReader<'_, Compat<tokio::io::BufReader<tokio::fs::File>>, WithoutEntry>>` to `std::pin::Pin<&mut dyn tokio::io::AsyncRead + Send>`

error[E0277]: the trait bound `dyn tokio::io::AsyncRead + Send: futures_io::if_std::AsyncBufRead` is not satisfied
   --> src/adapters/zip.rs:110:46
    |
110 |             let mut zip = ZipFileReader::new(inp);
    |                           ------------------ ^^^ the trait `futures_io::if_std::AsyncBufRead` is not implemented for `dyn tokio::io::AsyncRead + Send`
    |                           |
    |                           required by a bound introduced by this call
    |
    = help: the following other types implement trait `futures_io::if_std::AsyncBufRead`:
              &[u8]
              &mut T
              Box<T>
              Compat<T>
              async_compression::futures::write::BrotliDecoder<W>
              async_compression::futures::write::BrotliEncoder<W>
              async_compression::futures::write::BzDecoder<W>
              async_compression::futures::write::BzEncoder<W>
            and 21 others
    = note: required for `std::pin::Pin<Box<dyn tokio::io::AsyncRead + Send>>` to implement `futures_io::if_std::AsyncBufRead`
note: required by a bound in `async_zip::base::read::stream::ZipFileReader::<async_zip::base::read::stream::Ready<R>>::new`
   --> /home/lafrenierejm/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/async_zip-0.0.17/src/base/read/stream.rs:81:8
    |
81  |     R: AsyncBufRead + Unpin + 'a,
    |        ^^^^^^^^^^^^ required by this bound in `ZipFileReader::<Ready<R>>::new`
...
84  |     pub fn new(reader: R) -> Self {
    |            --- required by a bound in this associated function

error[E0599]: the method `next_with_entry` exists for struct `ZipFileReader<Ready<Pin<Box<dyn AsyncRead + Send>>>>`, but its trait bounds were not satisfied
    --> src/adapters/zip.rs:114:53
     |
114  |                     while let Some(mut entry) = zip.next_with_entry().await? {
     |                                                     ^^^^^^^^^^^^^^^ method cannot be called due to unsatisfied trait bounds
     |
    ::: /nix/store/hmpzw9x9c2bl5p7x6lss7yhy7qjig7qd-rust-default-1.85.0/lib/rustlib/src/rust/library/core/src/pin.rs:1089:1
     |
1089 | pub struct Pin<Ptr> {
     | ------------------- doesn't satisfy `_: AsyncBufRead`
     |
    ::: /home/lafrenierejm/
8000
.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tokio-1.43.0/src/io/async_read.rs:44:1
     |
44   | pub trait AsyncRead {
     | ------------------- doesn't satisfy `_: AsyncBufRead`
     |
     = note: the following trait bounds were not satisfied:
             `dyn tokio::io::AsyncRead + Send: futures_io::if_std::AsyncBufRead`
             which is required by `std::pin::Pin<Box<dyn tokio::io::AsyncRead + Send>>: futures_io::if_std::AsyncBufRead`

Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.

@phiresky
Copy link
Owner
phiresky commented Mar 2, 2025

haven't looked but did you read the change log of async zip? might have migration tips or the could be asked directly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0