From 9a1b076c0084e2bca8558818bffd2273ec5ae5bd Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Sun, 23 Nov 2025 10:26:48 +0100 Subject: [PATCH] io: replace `Result` with `io::Result` in `AsyncWrite` (#7740) --- tokio/src/io/async_write.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tokio/src/io/async_write.rs b/tokio/src/io/async_write.rs index e7da1a9c0..3c315a1bf 100644 --- a/tokio/src/io/async_write.rs +++ b/tokio/src/io/async_write.rs @@ -54,7 +54,7 @@ pub trait AsyncWrite { self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], - ) -> Poll>; + ) -> Poll>; /// Attempts to flush the object, ensuring that any buffered data reach /// their destination. @@ -65,7 +65,7 @@ pub trait AsyncWrite { /// `Poll::Pending` and arranges for the current task (via /// `cx.waker()`) to receive a notification when the object can make /// progress towards flushing. - fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll>; + fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll>; /// Initiates or attempts to shut down this writer, returning success when /// the I/O connection has completely shut down. @@ -125,7 +125,7 @@ pub trait AsyncWrite { /// /// This function will panic if not called within the context of a future's /// task. - fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll>; + fn poll_shutdown(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll>; /// Like [`poll_write`], except that it writes from a slice of buffers. /// @@ -154,7 +154,7 @@ pub trait AsyncWrite { self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], - ) -> Poll> { + ) -> Poll> { let buf = bufs .iter() .find(|b| !b.is_empty())