Fix clippy::single_match

This commit is contained in:
Alan Du 2019-06-03 10:01:10 -04:00
parent 354db651da
commit ecd420636e
9 changed files with 51 additions and 76 deletions

View file

@ -19,13 +19,10 @@ impl Drop for ScopedThread {
log::info!(".. {} terminated with {}", name, if res.is_ok() { "ok" } else { "err" });
// escalate panic, but avoid aborting the process
match res {
Err(e) => {
if !thread::panicking() {
panic!(e)
}
if let Err(e) = res {
if !thread::panicking() {
panic!(e)
}
_ => (),
}
}
}