Skip to content

Commit c26a8bb

Browse files
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.
2 parents 2d39300 + 026be9d commit c26a8bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/std/src/io/stdio.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,8 @@ pub struct Stdin {
251251
/// let mut buffer = String::new();
252252
/// let stdin = io::stdin(); // We get `Stdin` here.
253253
/// {
254-
/// let mut stdin_lock = stdin.lock(); // We get `StdinLock` here.
255-
/// stdin_lock.read_to_string(&mut buffer)?;
254+
/// let mut handle = stdin.lock(); // We get `StdinLock` here.
255+
/// handle.read_to_string(&mut buffer)?;
256256
/// } // `StdinLock` is dropped here.
257257
/// Ok(())
258258
/// }

0 commit comments

Comments
 (0)