about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2021-02-20 20:37:01 +0100
committerGitHub <noreply@github.com>2021-02-20 20:37:01 +0100
commitc26a8bbd6d0e7bbfa2891934a1af2934cab3b6bb (patch)
tree2d563e15b3ba3182f22fdececa54ffc9bbab0693
parent2d39300e2fff5801bc3589c0ec8310f23d83962f (diff)
parent026be9dc26c4cd867e2b406dee8c787afb224cfe (diff)
downloadrust-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.rs4
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(())
 /// }