Skip to content

Commit

Permalink
Rollup merge of #69405 - NieDzejkob:docs-readline-appends, r=joshtrip…
Browse files Browse the repository at this point in the history
…lett

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.
  • Loading branch information
pietroalbini committed Feb 24, 2020
2 parents 1cfb6c2 + b3e0d27 commit ba3fee6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libstd/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`].
Expand Down

0 comments on commit ba3fee6

Please sign in to comment.