diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-02-20 20:37:01 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-20 20:37:01 +0100 |
| commit | c26a8bbd6d0e7bbfa2891934a1af2934cab3b6bb (patch) | |
| tree | 2d563e15b3ba3182f22fdececa54ffc9bbab0693 | |
| parent | 2d39300e2fff5801bc3589c0ec8310f23d83962f (diff) | |
| parent | 026be9dc26c4cd867e2b406dee8c787afb224cfe (diff) | |
| download | rust-c26a8bbd6d0e7bbfa2891934a1af2934cab3b6bb.tar.gz rust-c26a8bbd6d0e7bbfa2891934a1af2934cab3b6bb.zip | |
Rollup merge of #82244 - pickfire:patch-6, r=dtolnay
Keep consistency in example for Stdin StdinLock Stdin uses handle whereas StdinLock uses stdin_lock, changed it to handle.
| -rw-r--r-- | library/std/src/io/stdio.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs index e736bf19e8f..d1f9049c8fa 100644 --- a/library/std/src/io/stdio.rs +++ b/library/std/src/io/stdio.rs @@ -251,8 +251,8 @@ pub struct Stdin { /// let mut buffer = String::new(); /// let stdin = io::stdin(); // We get `Stdin` here. /// { -/// let mut stdin_lock = stdin.lock(); // We get `StdinLock` here. -/// stdin_lock.read_to_string(&mut buffer)?; +/// let mut handle = stdin.lock(); // We get `StdinLock` here. +/// handle.read_to_string(&mut buffer)?; /// } // `StdinLock` is dropped here. /// Ok(()) /// } |
