Skip to content

Commit b013ad5

Browse files
committed
doc: Stdin is locked for reads, not writes
1 parent 74dfc1d commit b013ad5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libstd/io/stdio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ fn handle_ebadf<T>(r: io::Result<T>, default: T) -> io::Result<T> {
141141
///
142142
/// Each handle is a shared reference to a global buffer of input data to this
143143
/// process. A handle can be `lock`'d to gain full access to [`BufRead`] methods
144-
/// (e.g. `.lines()`). Writes to this handle are otherwise locked with respect
145-
/// to other writes.
144+
/// (e.g. `.lines()`). Reads to this handle are otherwise locked with respect
145+
/// to other reads.
146146
///
147147
/// This handle implements the `Read` trait, but beware that concurrent reads
148148
/// of `Stdin` must be executed with care.

0 commit comments

Comments
 (0)