From 5419aeea15e1b1a8e8aebc832ed5b93f59c2ce63 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Fri, 19 Feb 2021 17:50:00 -0800 Subject: [PATCH] doc: note the EOF behaviour of `read_until` This is completely stolen from the `read_line` documentation. --- 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 7977a0e8cc7..233ac31c463 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