Skip to content

Commit

Permalink
Rollup merge of rust-lang#126032 - ChrisDenton:update-docs, r=joboet
Browse files Browse the repository at this point in the history
Update description of the `IsTerminal` example

The example code prompts for input if stdin is a terminal.
  • Loading branch information
matthiaskrgr authored Jun 5, 2024
2 parents 7450cf0 + bf7430f commit 4a81c12
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions std/src/io/stdio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1190,9 +1190,8 @@ pub trait IsTerminal: crate::sealed::Sealed {
///
/// - If you run this example by piping some text to it, e.g. `echo "foo" | path/to/executable`
/// it will print: `Hello foo`.
/// - If you instead run the example interactively by running the executable directly, it will
/// panic with the message "Expected input to be piped to the process".
///
/// - If you instead run the example interactively by running `path/to/executable` directly, it will
/// prompt for input.
///
/// [changes]: io#platform-specific-behavior
/// [`Stdin`]: crate::io::Stdin
Expand Down

0 comments on commit 4a81c12

Please sign in to comment.