From a7a28d709170f5dd14439c83d115e16a11c53c06 Mon Sep 17 00:00:00 2001 From: Matt Brubeck Date: Wed, 18 Mar 2015 17:38:11 -0700 Subject: [PATCH] Clarify in docs that BufRead::read_line appends Multiple people have been suprised by this aspect of read_line's behavior, which is not obvious from the docs. --- src/libstd/io/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index d9e8047104ad0..99c6592773400 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -592,7 +592,8 @@ pub trait BufRead: Read { read_until(self, byte, buf) } - /// Read all bytes until a newline byte (the 0xA byte) is reached. + /// Read all bytes until a newline byte (the 0xA byte) is reached, and + /// append them to the provided buffer. /// /// This function will continue to read (and buffer) bytes from the /// underlying stream until the newline delimiter (the 0xA byte) or EOF is