rs-async-zip icon indicating copy to clipboard operation
rs-async-zip copied to clipboard

`tokio::io::AsyncRead`(`Ext`) doesn't seem to be implemented for `async_zip::tokio::read::ZipEntryReader`

Open theRookieCoder opened this issue 2 years ago • 1 comments

When I use async_zip::tokio::read::seek::ZipFileReader::reader_with_entry() to get a reader, I don't seem to be able to use tokio's AsyncRead or AsyncReadExt on it, despite using the tokio specific module. This is fine for when I only want to read (since I could use the function aliases read_to_<end/string>_checked()), but when I'm using something like copy(), having AsyncRead implemented is required.

theRookieCoder avatar Jun 18 '23 09:06 theRookieCoder

I think you can use .compat().

I think rs-async-zip want not to have dependencyship to tokio in core so I'm using compat for most case.

anatawa12 avatar Sep 20 '23 16:09 anatawa12

Can confirm, using .compat() fixes this. But it requires the dependency tokio-util and isn't documented anywhere at the moment.

theRookieCoder avatar Feb 16 '24 18:02 theRookieCoder