Skip to content

Instantly share code, notes, and snippets.

@pmsanford
Created December 24, 2014 17:27
Show Gist options
  • Save pmsanford/0d8d552baf95e83b0c6c to your computer and use it in GitHub Desktop.
Save pmsanford/0d8d552baf95e83b0c6c to your computer and use it in GitHub Desktop.
use std::thread::{Thread, JoinGuard};
use std::io::stdio::set_stderr;
use std::io::util::NullWriter;
fn main() {
let _tg: JoinGuard<()> = Thread::spawn(move || {
set_stderr(box NullWriter);
panic!("Test");
});
println!("Done");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment