Skip to content

Commit

Permalink
Don't output panic noise from panic test
Browse files Browse the repository at this point in the history
P.S. rustfmt 0.4.1-stable (7a807262 2018-04-20)
  • Loading branch information
rlkelly authored and aeyakovenko committed May 14, 2018
1 parent cc447c0 commit 916fda7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
}
Expand Down

0 comments on commit 916fda7

Please sign in to comment.