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:
Guillaume Gomez 2021-02-20 20:37:01 +01:00 committed by GitHub
commit c26a8bbd6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View 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(())
/// }