mirror of
https://github.com/chatmail/core.git
synced 2026-04-02 05:22:14 +03:00
Use Option<EncryptPreference>.unwrap_or_default in aheader.rs
This commit is contained in:
committed by
holger krekel
parent
0db5ff55fd
commit
f1aba8115b
@@ -150,13 +150,10 @@ impl str::FromStr for Aheader {
|
||||
}
|
||||
};
|
||||
|
||||
let prefer_encrypt = match attributes
|
||||
let prefer_encrypt = attributes
|
||||
.remove("prefer-encrypt")
|
||||
.and_then(|raw| raw.parse().ok())
|
||||
{
|
||||
Some(pref) => pref,
|
||||
None => EncryptPreference::NoPreference,
|
||||
};
|
||||
.unwrap_or_default();
|
||||
|
||||
// Autocrypt-Level0: unknown attributes starting with an underscore can be safely ignored
|
||||
// Autocrypt-Level0: unknown attribute, treat the header as invalid
|
||||
|
||||
Reference in New Issue
Block a user