From ecd420636efe54657ae742ce960ce061740ef108 Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 3 Jun 2019 10:01:10 -0400 Subject: Fix clippy::single_match --- crates/thread_worker/src/lib.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'crates/thread_worker') diff --git a/crates/thread_worker/src/lib.rs b/crates/thread_worker/src/lib.rs index d67e44e38..d8d0d9bf2 100644 --- a/crates/thread_worker/src/lib.rs +++ b/crates/thread_worker/src/lib.rs @@ -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) } - _ => (), } } } -- cgit v1.2.3