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:
parent
94a95067e0
commit
a7a28d7091
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue