Skip to content

Commit 5b9a290

Browse files
authored
io: clarify zero remaining capacity case (#6790)
1 parent 70569bd commit 5b9a290

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tokio/src/io/async_read.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ use std::task::{Context, Poll};
1818
/// * `Poll::Ready(Ok(()))` means that data was immediately read and placed into
1919
/// the output buffer. The amount of data read can be determined by the
2020
/// increase in the length of the slice returned by `ReadBuf::filled`. If the
21-
/// difference is 0, EOF has been reached.
21+
/// difference is 0, either EOF has been reached, or the output buffer had zero
22+
/// capacity (i.e. `buf.remaining()` == 0).
2223
///
2324
/// * `Poll::Pending` means that no data was read into the buffer
2425
/// provided. The I/O object is not currently readable but may become readable

0 commit comments

Comments
 (0)