diff options
| author | Matt Brubeck <mbrubeck@limpet.net> | 2015-03-18 17:38:11 -0700 |
|---|---|---|
| committer | Matt Brubeck <mbrubeck@limpet.net> | 2015-03-18 17:38:11 -0700 |
| commit | a7a28d709170f5dd14439c83d115e16a11c53c06 (patch) | |
| tree | ead1938f396d4c6e564515e86e5730bd3da7d749 /src/libstd | |
| parent | 94a95067e017252d4928a4292a6aeef66902e694 (diff) | |
| download | rust-a7a28d709170f5dd14439c83d115e16a11c53c06.tar.gz rust-a7a28d709170f5dd14439c83d115e16a11c53c06.zip | |
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.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/io/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index d9e8047104a..99c65927734 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 |
