From 53558cb48964d7e0f2c97687504711ab47bf1890 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Sat, 20 Feb 2021 01:22:51 -0800 Subject: [PATCH] doc: note the EOF behaviour of read_until (#3536) --- tokio/src/io/util/async_buf_read_ext.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tokio/src/io/util/async_buf_read_ext.rs b/tokio/src/io/util/async_buf_read_ext.rs index 7977a0e8c..233ac31c4 100644 --- a/tokio/src/io/util/async_buf_read_ext.rs +++ b/tokio/src/io/util/async_buf_read_ext.rs @@ -23,6 +23,8 @@ cfg_io_util! { /// /// If successful, this function will return the total number of bytes read. /// + /// If this function returns `Ok(0)`, the stream has reached EOF. + /// /// # Errors /// /// This function will ignore all instances of [`ErrorKind::Interrupted`] and