Remove some Unpin requirements (#1403)

This commit is contained in:
Pierre Krieger
2020-01-23 10:44:52 +01:00
committed by GitHub
parent 3405fc8b32
commit d6bf8a5aeb

View File

@ -48,7 +48,7 @@ impl<S: TryStream> RwStreamSink<S> {
impl<S> AsyncRead for RwStreamSink<S>
where
S: TryStream<Error = io::Error> + Unpin,
S: TryStream<Error = io::Error>,
<S as TryStream>::Ok: AsRef<[u8]>
{
fn poll_read(self: Pin<&mut Self>, cx: &mut Context, buf: &mut [u8]) -> Poll<io::Result<usize>> {
@ -75,7 +75,7 @@ where
impl<S> AsyncWrite for RwStreamSink<S>
where
S: TryStream + Sink<<S as TryStream>::Ok, Error = io::Error> + Unpin,
S: TryStream + Sink<<S as TryStream>::Ok, Error = io::Error>,
<S as TryStream>::Ok: for<'r> From<&'r [u8]>
{
fn poll_write(self: Pin<&mut Self>, cx: &mut Context, buf: &[u8]) -> Poll<io::Result<usize>> {