diff --git a/tokio/src/io/util/mem.rs b/tokio/src/io/util/mem.rs index 1510db34587..4019db56ff4 100644 --- a/tokio/src/io/util/mem.rs +++ b/tokio/src/io/util/mem.rs @@ -245,7 +245,7 @@ impl AsyncRead for Pipe { cfg_not_coop! { fn poll_read( - mut self: Pin<&mut Self>, + self: Pin<&mut Self>, cx: &mut task::Context<'_>, buf: &mut ReadBuf<'_>, ) -> Poll> { @@ -273,7 +273,7 @@ impl AsyncWrite for Pipe { cfg_not_coop! { fn poll_write( - mut self: Pin<&mut Self>, + self: Pin<&mut Self>, cx: &mut task::Context<'_>, buf: &[u8], ) -> Poll> { diff --git a/tokio/tests/io_mem_stream.rs b/tokio/tests/io_mem_stream.rs index 4b5e7b7746f..a2c2dadfc90 100644 --- a/tokio/tests/io_mem_stream.rs +++ b/tokio/tests/io_mem_stream.rs @@ -111,9 +111,9 @@ async fn duplex_is_cooperative() { _ = async { loop { let buf = [3u8; 4096]; - let _ = tx.write_all(&buf).await; + tx.write_all(&buf).await.unwrap(); let mut buf = [0u8; 4096]; - let _ = rx.read(&mut buf).await; + rx.read(&mut buf).await.unwrap(); } } => {}, _ = tokio::task::yield_now() => {}