aboutsummaryrefslogtreecommitdiff
path: root/crates/thread_worker
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2019-06-03 15:01:10 +0100
committerAlan Du <[email protected]>2019-06-04 23:05:07 +0100
commitecd420636efe54657ae742ce960ce061740ef108 (patch)
tree612606f7a9f093375a946a69078041f095eb0d8b /crates/thread_worker
parent354db651dafd24d93cf0f151d63ad5ecb2e716e2 (diff)
Fix clippy::single_match
Diffstat (limited to 'crates/thread_worker')
-rw-r--r--crates/thread_worker/src/lib.rs9
1 files changed, 3 insertions, 6 deletions
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 {
19 log::info!(".. {} terminated with {}", name, if res.is_ok() { "ok" } else { "err" }); 19 log::info!(".. {} terminated with {}", name, if res.is_ok() { "ok" } else { "err" });
20 20
21 // escalate panic, but avoid aborting the process 21 // escalate panic, but avoid aborting the process
22 match res { 22 if let Err(e) = res {
23 Err(e) => { 23 if !thread::panicking() {
24 if !thread::panicking() { 24 panic!(e)
25 panic!(e)
26 }
27 } 25 }
28 _ => (),
29 } 26 }
30 } 27 }
31} 28}