Debian Codegraph @

debian/missing-sources/anstream/examples/query-stream.rs

raw
1 //! Report a terminal's capabilities
2
3 fn main() {
4 println!("stdout:");
5 println!(
6 " choice: {:?}",
7 anstream::AutoStream::choice(&std::io::stdout())
8 );
9 println!(
10 " choice: {:?}",
11 anstream::AutoStream::auto(std::io::stdout()).current_choice()
12 );
13 println!("stderr:");
14 println!(
15 " choice: {:?}",
16 anstream::AutoStream::choice(&std::io::stderr())
17 );
18 println!(
19 " choice: {:?}",
20 anstream::AutoStream::auto(std::io::stderr()).current_choice()
21 );
22 }