Merge "Replace if statement with call to Option::map"
This commit is contained in:
commit
a68ba13323
1 changed files with 1 additions and 3 deletions
|
@ -126,10 +126,8 @@ impl SuperKeyIdentifier {
|
|||
fn from_metadata(metadata: &BlobMetaData) -> Option<Self> {
|
||||
if let Some(EncryptedBy::KeyId(key_id)) = metadata.encrypted_by() {
|
||||
Some(SuperKeyIdentifier::DatabaseId(*key_id))
|
||||
} else if let Some(boot_level) = metadata.max_boot_level() {
|
||||
Some(SuperKeyIdentifier::BootLevel(*boot_level))
|
||||
} else {
|
||||
None
|
||||
metadata.max_boot_level().map(|boot_level| SuperKeyIdentifier::BootLevel(*boot_level))
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue