aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/errors.rs
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2022-10-05 16:49:40 -0700
committerBryan Newbold <bnewbold@robocracy.org>2022-10-05 16:49:40 -0700
commit9faf093b50da190a5efee47f3b00bd425a940c40 (patch)
tree396a6fd04188385217b6e3c0cae4f91069f1ec38 /rust/src/errors.rs
parent00c97e7a0ffb43460d544e83d2f6f2856c241cd7 (diff)
downloadfatcat-9faf093b50da190a5efee47f3b00bd425a940c40.tar.gz
fatcat-9faf093b50da190a5efee47f3b00bd425a940c40.zip
rust: clippy cleanups
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())