aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/errors.rs
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2022-10-06 01:56:36 +0000
committerbnewbold <bnewbold@archive.org>2022-10-06 01:56:36 +0000
commite5ee112a13cc331a488d395c4da1f80a9dd61930 (patch)
tree396a6fd04188385217b6e3c0cae4f91069f1ec38 /rust/src/errors.rs
parent8bdd5fd92a33cf05424447241033bd529b68af77 (diff)
parent9faf093b50da190a5efee47f3b00bd425a940c40 (diff)
downloadfatcat-e5ee112a13cc331a488d395c4da1f80a9dd61930.tar.gz
fatcat-e5ee112a13cc331a488d395c4da1f80a9dd61930.zip
Merge branch 'bnewbold-rust-macaroons-upstream' into 'master'
rust: refactor closer to 'macaroon' crate See merge request webgroup/fatcat!143
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())