Skip to content

Commit

Permalink
Keep consistency in example for Stdin StdinLock
Browse files Browse the repository at this point in the history
Stdin uses handle whereas StdinLock uses stdin_lock, changed it to handle.
  • Loading branch information
pickfire committed Feb 18, 2021
1 parent 93f6a4b commit 026be9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/io/stdio.rs
Expand Up @@ -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(())
/// }
Expand Down

0 comments on commit 026be9d

Please sign in to comment.