fparkan/vendor/anstream/examples/query-stream.rs
Valentin Popov 1b6a04ca55
Initial vendor packages
Signed-off-by: Valentin Popov <valentin@popov.link>
2024-01-08 01:21:28 +04:00

21 lines
508 B
Rust

fn main() {
println!("stdout:");
println!(
" choice: {:?}",
anstream::AutoStream::choice(&std::io::stdout())
);
println!(
" choice: {:?}",
anstream::AutoStream::auto(std::io::stdout()).current_choice()
);
println!("stderr:");
println!(
" choice: {:?}",
anstream::AutoStream::choice(&std::io::stderr())
);
println!(
" choice: {:?}",
anstream::AutoStream::auto(std::io::stderr()).current_choice()
);
}