diff options
| author | Ivan Tham <pickfire@riseup.net> | 2021-02-18 10:11:57 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-18 10:11:57 +0800 |
| commit | 026be9dc26c4cd867e2b406dee8c787afb224cfe (patch) | |
| tree | bb8630271d8dde4ff6256145f4130d8b89b47e19 | |
| parent | 93f6a4b9d85b7eef71e17d95c113f5834238b574 (diff) | |
| download | rust-026be9dc26c4cd867e2b406dee8c787afb224cfe.tar.gz rust-026be9dc26c4cd867e2b406dee8c787afb224cfe.zip | |
Keep consistency in example for Stdin StdinLock
Stdin uses handle whereas StdinLock uses stdin_lock, changed it to handle.
| -rw-r--r-- | library/std/src/io/stdio.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/std/src/io/stdio.rs b/library/std/src/io/stdio.rs index 1160011f352..80933f6de3d 100644 --- a/library/std/src/io/stdio.rs +++ b/library/std/src/io/stdio.rs @@ -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(()) /// } |
