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

Lines changed: 2 additions & 3 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy