shh 1.0.1

Silence stderr and stdout, optionally rerouting it.
Documentation
1
2
3
4
5
6
7
8
9
10
extern crate shh;
use std::io::Read;

fn main() {
    let mut shh = shh::stdout().unwrap();
    println!("hello, world!",);
    let mut s = String::new();
    shh.read_to_string(&mut s).unwrap();
    assert_eq!(&s, "hello, world!\n"); // notice the new line!
}