Skip to content

Commit c6aceed

Browse files
authored
io: clarify the zero capacity case of AsyncRead::poll_read (#7580)
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
1 parent 4590828 commit c6aceed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tokio/src/io/async_read.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ pub trait AsyncRead {
4646
///
4747
/// On success, returns `Poll::Ready(Ok(()))` and places data in the
4848
/// unfilled portion of `buf`. If no data was read (`buf.filled().len()` is
49-
/// unchanged), it implies that EOF has been reached.
49+
/// unchanged), it implies that EOF has been reached, or the output buffer
50+
/// had zero capacity (i.e. `buf.remaining()` == 0).
5051
///
5152
/// If no data is available for reading, the method returns `Poll::Pending`
5253
/// and arranges for the current task (via `cx.waker()`) to receive a

0 commit comments

Comments
 (0)