We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 7420c36 + fca0919 commit 113c6c0Copy full SHA for 113c6c0
std/src/io/stdio.rs
@@ -370,7 +370,12 @@ impl Stdin {
370
/// Locks this handle and reads a line of input, appending it to the specified buffer.
371
///
372
/// For detailed semantics of this method, see the documentation on
373
- /// [`BufRead::read_line`].
+ /// [`BufRead::read_line`]. In particular:
374
+ /// * Previous content of the buffer will be preserved. To avoid appending
375
+ /// to the buffer, you need to [`clear`] it first.
376
+ /// * The trailing newline character, if any, is included in the buffer.
377
+ ///
378
+ /// [`clear`]: String::clear
379
380
/// # Examples
381
0 commit comments