Don't output panic noise from panic test
P.S. rustfmt 0.4.1-stable (7a807262 2018-04-20)
This commit is contained in:
parent
b132ce1944
commit
4a94da8a94
|
@ -78,6 +78,7 @@ mod tests {
|
||||||
use std::io;
|
use std::io;
|
||||||
use std::io::Write;
|
use std::io::Write;
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
|
use std::panic;
|
||||||
use std::sync::mpsc::RecvError;
|
use std::sync::mpsc::RecvError;
|
||||||
use std::sync::mpsc::RecvTimeoutError;
|
use std::sync::mpsc::RecvTimeoutError;
|
||||||
use std::sync::mpsc::channel;
|
use std::sync::mpsc::channel;
|
||||||
|
@ -89,6 +90,7 @@ mod tests {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn join_error() -> Result<()> {
|
fn join_error() -> Result<()> {
|
||||||
|
panic::set_hook(Box::new(|_info| {}));
|
||||||
let r = thread::spawn(|| panic!("hi")).join()?;
|
let r = thread::spawn(|| panic!("hi")).join()?;
|
||||||
Ok(r)
|
Ok(r)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue