Skip to content

Commit 4a81c12

Browse files
authored
Rollup merge of rust-lang#126032 - ChrisDenton:update-docs, r=joboet
Update description of the `IsTerminal` example The example code prompts for input if stdin is a terminal.
2 parents 7450cf0 + bf7430f commit 4a81c12

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

std/src/io/stdio.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -1190,9 +1190,8 @@ pub trait IsTerminal: crate::sealed::Sealed {
11901190
///
11911191
/// - If you run this example by piping some text to it, e.g. `echo "foo" | path/to/executable`
11921192
/// it will print: `Hello foo`.
1193-
/// - If you instead run the example interactively by running the executable directly, it will
1194-
/// panic with the message "Expected input to be piped to the process".
1195-
///
1193+
/// - If you instead run the example interactively by running `path/to/executable` directly, it will
1194+
/// prompt for input.
11961195
///
11971196
/// [changes]: io#platform-specific-behavior
11981197
/// [`Stdin`]: crate::io::Stdin

0 commit comments

Comments
 (0)