Rollup merge of #126032 - ChrisDenton:update-docs, r=joboet
Update description of the `IsTerminal` example The example code prompts for input if stdin is a terminal.
This commit is contained in:
commit
fa58891f99
@ -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`
|
/// - If you run this example by piping some text to it, e.g. `echo "foo" | path/to/executable`
|
||||||
/// it will print: `Hello foo`.
|
/// it will print: `Hello foo`.
|
||||||
/// - If you instead run the example interactively by running the executable directly, it will
|
/// - If you instead run the example interactively by running `path/to/executable` directly, it will
|
||||||
/// panic with the message "Expected input to be piped to the process".
|
/// prompt for input.
|
||||||
///
|
|
||||||
///
|
///
|
||||||
/// [changes]: io#platform-specific-behavior
|
/// [changes]: io#platform-specific-behavior
|
||||||
/// [`Stdin`]: crate::io::Stdin
|
/// [`Stdin`]: crate::io::Stdin
|
||||||
|
Loading…
Reference in New Issue
Block a user