diff --git a/misc/rw-stream-sink/src/lib.rs b/misc/rw-stream-sink/src/lib.rs index 69b30205..9268e299 100644 --- a/misc/rw-stream-sink/src/lib.rs +++ b/misc/rw-stream-sink/src/lib.rs @@ -48,7 +48,7 @@ impl RwStreamSink { impl AsyncRead for RwStreamSink where - S: TryStream + Unpin, + S: TryStream, ::Ok: AsRef<[u8]> { fn poll_read(self: Pin<&mut Self>, cx: &mut Context, buf: &mut [u8]) -> Poll> { @@ -75,7 +75,7 @@ where impl AsyncWrite for RwStreamSink where - S: TryStream + Sink<::Ok, Error = io::Error> + Unpin, + S: TryStream + Sink<::Ok, Error = io::Error>, ::Ok: for<'r> From<&'r [u8]> { fn poll_write(self: Pin<&mut Self>, cx: &mut Context, buf: &[u8]) -> Poll> {