mirror of
https://github.com/chatmail/core.git
synced 2026-04-29 11:26:29 +03:00
Use anyhow for key.rs error handling
This commit is contained in:
@@ -86,11 +86,7 @@ async fn decode_openpgp(context: &Context, qr: &str) -> Lot {
|
||||
};
|
||||
let fingerprint: Fingerprint = match fingerprint.parse() {
|
||||
Ok(fp) => fp,
|
||||
Err(err) => {
|
||||
return Error::new(err)
|
||||
.context("Failed to parse fingerprint in QR code")
|
||||
.into()
|
||||
}
|
||||
Err(err) => return err.context("Failed to parse fingerprint in QR code").into(),
|
||||
};
|
||||
|
||||
let param: BTreeMap<&str, &str> = fragment
|
||||
|
||||
Reference in New Issue
Block a user