From 9faf093b50da190a5efee47f3b00bd425a940c40 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 5 Oct 2022 16:49:40 -0700 Subject: rust: clippy cleanups --- rust/src/errors.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src/errors.rs') diff --git a/rust/src/errors.rs b/rust/src/errors.rs index ea0f9646..38429802 100644 --- a/rust/src/errors.rs +++ b/rust/src/errors.rs @@ -173,16 +173,16 @@ impl From for FatcatError { impl From for FatcatError { fn from(error: failure::Error) -> FatcatError { // TODO: I think it should be possible to match here? regardless, this is *super* janky - if let Some(_) = error.downcast_ref::() { + if error.downcast_ref::().is_some() { return error.downcast::().unwrap(); } - if let Some(_) = error.downcast_ref::() { + if error.downcast_ref::().is_some() { return error.downcast::().unwrap().into(); } - if let Some(_) = error.downcast_ref::() { + if error.downcast_ref::().is_some() { return error.downcast::().unwrap().into(); } - if let Some(_) = error.downcast_ref::() { + if error.downcast_ref::().is_some() { return error.downcast::().unwrap().into(); } FatcatError::InternalError(error.to_string()) -- cgit v1.2.3