]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/io/stdio.rs
Rollup merge of #82244 - pickfire:patch-6, r=dtolnay
[rust.git] / library / std / src / io / stdio.rs
index e736bf19e8f9369792c5b59bfa68c8539ed54c1d..d1f9049c8fabbb9dcee67a72748c74a9718ae290 100644 (file)
@@ -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(())
 /// }