Merge pull request #215 from garious/suppress_panic_message_in_tests
Don't output panic noise from panic test
This commit is contained in:
commit
a578c1a5e3
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue