aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/errors.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/src/errors.rs')
-rw-r--r--rust/src/errors.rs8
1 files changed, 4 insertions, 4 deletions
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<data_encoding::DecodeError> for FatcatError {
impl From<failure::Error> 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::<FatcatError>() {
+ if error.downcast_ref::<FatcatError>().is_some() {
return error.downcast::<FatcatError>().unwrap();
}
- if let Some(_) = error.downcast_ref::<std::fmt::Error>() {
+ if error.downcast_ref::<std::fmt::Error>().is_some() {
return error.downcast::<std::fmt::Error>().unwrap().into();
}
- if let Some(_) = error.downcast_ref::<diesel::result::Error>() {
+ if error.downcast_ref::<diesel::result::Error>().is_some() {
return error.downcast::<diesel::result::Error>().unwrap().into();
}
- if let Some(_) = error.downcast_ref::<uuid::ParseError>() {
+ if error.downcast_ref::<uuid::ParseError>().is_some() {
return error.downcast::<uuid::ParseError>().unwrap().into();
}
FatcatError::InternalError(error.to_string())