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
commit a578c1a5e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

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)
}