From 7da07ff48bee36fabce6a6683eabd27003e32b8d Mon Sep 17 00:00:00 2001 From: "zed.zy" Date: Tue, 15 Mar 2022 19:37:52 +0800 Subject: [PATCH] Improve the explanation about the behaviour of read_line --- library/std/src/io/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 @@ fn read_until(&mut self, byte: u8, buf: &mut Vec) -> Result { } /// 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