mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 01:16:31 +03:00
Use as_deref() instead of unwrapping Option
This commit is contained in:
@@ -51,13 +51,7 @@ impl Lot {
|
|||||||
Qr::FprWithoutAddr { fingerprint, .. } => Some(fingerprint),
|
Qr::FprWithoutAddr { fingerprint, .. } => Some(fingerprint),
|
||||||
Qr::Account { domain } => Some(domain),
|
Qr::Account { domain } => Some(domain),
|
||||||
Qr::WebrtcInstance { domain, .. } => Some(domain),
|
Qr::WebrtcInstance { domain, .. } => Some(domain),
|
||||||
Qr::Addr { draft, .. } => {
|
Qr::Addr { draft, .. } => draft.as_deref(),
|
||||||
if let Some(draft) = draft {
|
|
||||||
Some(draft)
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Qr::Url { url } => Some(url),
|
Qr::Url { url } => Some(url),
|
||||||
Qr::Text { text } => Some(text),
|
Qr::Text { text } => Some(text),
|
||||||
Qr::WithdrawVerifyContact { .. } => None,
|
Qr::WithdrawVerifyContact { .. } => None,
|
||||||
|
|||||||
Reference in New Issue
Block a user