about summary refs log tree commit diff
diff options
context:
space:
mode:
authorzed.zy <zed.zy@antgroup.com>2022-03-15 19:37:52 +0800
committerzed.zy <zed.zy@antgroup.com>2022-03-15 19:37:52 +0800
commit7da07ff48bee36fabce6a6683eabd27003e32b8d (patch)
tree7c1552043ee6eef0ea2221b04d2e9c03bd61381c
parent3ba1ebea122238d1a5c613deb1bf60ce24bd8fd8 (diff)
downloadrust-7da07ff48bee36fabce6a6683eabd27003e32b8d.tar.gz
rust-7da07ff48bee36fabce6a6683eabd27003e32b8d.zip
Improve the explanation about the behaviour of read_line
-rw-r--r--library/std/src/io/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/std/src/io/mod.rs b/library/std/src/io/mod.rs
index 6005270a75f..e53e1f49309 100644
--- a/library/std/src/io/mod.rs
+++ b/library/std/src/io/mod.rs
@@ -2110,7 +2110,7 @@ pub trait BufRead: Read {
     }
 
     /// Read all bytes until a newline (the `0xA` byte) is reached, and append
-    /// them to the provided buffer.
+    /// them to the provided buffer (without clear buffer before appending to it).
     ///
     /// This function will read bytes from the underlying stream until the
     /// newline delimiter (the `0xA` byte) or EOF is found. Once found, all bytes