diff options
| author | Pietro Albini <pietro@pietroalbini.org> | 2020-02-24 11:15:36 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-24 11:15:36 +0100 |
| commit | ba3fee65377174a8d375b7edca0909bba4259bfe (patch) | |
| tree | 818afc69fe93e158cd5488d2c2bbc59c17f041ae /src | |
| parent | 1cfb6c2ab0988ec3b6bfe423d02ad775bc60c405 (diff) | |
| parent | b3e0d272af149c4126f90a0262d796d7401ba7a1 (diff) | |
| download | rust-ba3fee65377174a8d375b7edca0909bba4259bfe.tar.gz rust-ba3fee65377174a8d375b7edca0909bba4259bfe.zip | |
Rollup merge of #69405 - NieDzejkob:docs-readline-appends, r=joshtriplett
docs: Stdin::read_line: mention the appending The fact that `stdin().read_line()` is an [unpleasant](https://twitter.com/Michcioperz/status/1231646797661167617?s=20) [footgun](https://rustbattle.net/battle/straight-finch-8-e4f4). Let's make it clearer in the documentation.
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/io/stdio.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 6add644dcc2..d410faca30d 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -302,7 +302,7 @@ impl Stdin { StdinLock { inner: self.inner.lock().unwrap_or_else(|e| e.into_inner()) } } - /// Locks this handle and reads a line of input into the specified buffer. + /// Locks this handle and reads a line of input, appending it to the specified buffer. /// /// For detailed semantics of this method, see the documentation on /// [`BufRead::read_line`]. |
