Closed TheNeikos closed 2 years ago
I think this comes from using the older AsyncRead
/AsyncWrite
definitions from tokio-io
. In that crate they were extensions of Read
/Write
. But in more recent tokio they are not.
As @TheNeikos points out, this comes from the R: Read
bound when using most of the ::new
fns. This was always true in the past because of AsyncRead
being historically Read
.
Ah, indeed in 2.0 it seems that the Write
bound has been removed. Well, once it is updated to that, I can integrate this crate then 👍
It looks like the plan might be to drop tokio support from this crate and have people depend on the async_compression crate for that instead: https://github.com/rust-lang/flate2-rs/pull/214
Hello! I'm trying to use a tcp
OwnedWriteHalf
from tokio with flate2, but am unable to do so as it does not implementWrite
and instead only implementsAsyncWrite
.Is there a way for me to still use this library? Since
GzEncoder
etc... all requireWrite
but also implementAsyncWrite
when the wrappedT
does, it feels like that theWrite
bound is too restrictive.Simple playground: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b0c9dd53d0735d38f24e076a1469c9e0