Merge pull request #215 from garious/suppress_panic_message_in_tests

Don't output panic noise from panic test
This commit is contained in:
Greg Fitzgerald
2018-05-14 11:46:22 -06:00
committed by GitHub

View File

@ -78,6 +78,7 @@ mod tests {
use std::io;
use std::io::Write;
use std::net::SocketAddr;
use std::panic;
use std::sync::mpsc::RecvError;
use std::sync::mpsc::RecvTimeoutError;
use std::sync::mpsc::channel;
@ -89,6 +90,7 @@ mod tests {
}
fn join_error() -> Result<()> {
panic::set_hook(Box::new(|_info| {}));
let r = thread::spawn(|| panic!("hi")).join()?;
Ok(r)
}