Skip to content

Commit

Permalink
Rollup merge of rust-lang#82244 - pickfire:patch-6, r=dtolnay
Browse files Browse the repository at this point in the history
Keep consistency in example for Stdin StdinLock

Stdin uses handle whereas StdinLock uses stdin_lock, changed it to handle.
  • Loading branch information
GuillaumeGomez committed Feb 19, 2021
2 parents b23eeb5 + 026be9d commit e59fc76
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/std/src/io/stdio.rs
Original file line number Diff line number Diff line change
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 e59fc76

Please sign in to comment.