mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: clippy: add map_unwrap_or
Signed-off-by: Philipp Schuster <philipp.schuster@cyberus-technology.de> On-behalf-of: SAP philipp.schuster@sap.com
This commit is contained in:
committed by
Rob Bradford
parent
dda89d7027
commit
d2b19bb969
@@ -763,8 +763,7 @@ impl Vm {
|
||||
.unwrap()
|
||||
.payload
|
||||
.as_ref()
|
||||
.map(|p| p.fw_cfg_config.is_some())
|
||||
.unwrap_or(false);
|
||||
.is_some_and(|p| p.fw_cfg_config.is_some());
|
||||
if fw_cfg_config {
|
||||
device_manager
|
||||
.lock()
|
||||
@@ -2338,8 +2337,7 @@ impl Vm {
|
||||
.unwrap()
|
||||
.payload
|
||||
.as_ref()
|
||||
.map(|p| p.fw_cfg_config.is_some())
|
||||
.unwrap_or(false);
|
||||
.is_some_and(|p| p.fw_cfg_config.is_some());
|
||||
if fw_cfg_enabled {
|
||||
let fw_cfg_config = self
|
||||
.config
|
||||
|
||||
Reference in New Issue
Block a user