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.
This commit is contained in:
commit
c26a8bbd6d
1 changed files with 2 additions and 2 deletions
|
@ -251,8 +251,8 @@ pub struct Stdin {
|
||||||
/// let mut buffer = String::new();
|
/// let mut buffer = String::new();
|
||||||
/// let stdin = io::stdin(); // We get `Stdin` here.
|
/// let stdin = io::stdin(); // We get `Stdin` here.
|
||||||
/// {
|
/// {
|
||||||
/// let mut stdin_lock = stdin.lock(); // We get `StdinLock` here.
|
/// let mut handle = stdin.lock(); // We get `StdinLock` here.
|
||||||
/// stdin_lock.read_to_string(&mut buffer)?;
|
/// handle.read_to_string(&mut buffer)?;
|
||||||
/// } // `StdinLock` is dropped here.
|
/// } // `StdinLock` is dropped here.
|
||||||
/// Ok(())
|
/// Ok(())
|
||||||
/// }
|
/// }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue