Use as_deref() instead of unwrapping Option

This commit is contained in:
link2xt
2022-07-09 19:24:01 +00:00
parent 62a0ce29e9
commit 0b2c3ee163

View File

@@ -51,13 +51,7 @@ impl Lot {
Qr::FprWithoutAddr { fingerprint, .. } => Some(fingerprint),
Qr::Account { domain } => Some(domain),
Qr::WebrtcInstance { domain, .. } => Some(domain),
Qr::Addr { draft, .. } => {
if let Some(draft) = draft {
Some(draft)
} else {
None
}
}
Qr::Addr { draft, .. } => draft.as_deref(),
Qr::Url { url } => Some(url),
Qr::Text { text } => Some(text),
Qr::WithdrawVerifyContact { .. } => None,