mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Keep consistency in example for Stdin StdinLock
Stdin uses handle whereas StdinLock uses stdin_lock, changed it to handle.
This commit is contained in:
parent
93f6a4b9d8
commit
026be9dc26
@ -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(())
|
||||
/// }
|
||||
|
Loading…
Reference in New Issue
Block a user