1
Fork 0

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.
This commit is contained in:
Matt Brubeck 2015-03-18 17:38:11 -07:00
parent 94a95067e0
commit a7a28d7091

View file

@ -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