From c25b73e2834d1efc7772376b138c497fb2b894df Mon Sep 17 00:00:00 2001 From: Ross Canning Date: Sun, 18 Aug 2024 11:01:33 +1000 Subject: [PATCH] fix explanation of 'zero bytes read' case --- tokio/src/io/async_read.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tokio/src/io/async_read.rs b/tokio/src/io/async_read.rs index 93e5d3e66ed..ca3a435f2b8 100644 --- a/tokio/src/io/async_read.rs +++ b/tokio/src/io/async_read.rs @@ -18,7 +18,8 @@ use std::task::{Context, Poll}; /// * `Poll::Ready(Ok(()))` means that data was immediately read and placed into /// the output buffer. The amount of data read can be determined by the /// increase in the length of the slice returned by `ReadBuf::filled`. If the -/// difference is 0, EOF has been reached. +/// difference is 0, either EOF has been reached, or the output buffer had zero +/// capacity (i.e. `buf.remaining()` == 0). /// /// * `Poll::Pending` means that no data was read into the buffer /// provided. The I/O object is not currently readable but may become readable