mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: unrelated small code improvements
Unfortunately, there is no lint for that. 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
fed010fcd1
commit
f02745a7ed
@@ -1874,9 +1874,8 @@ impl RequestHandler for Vmm {
|
||||
}
|
||||
|
||||
if let Some(ref mut vm) = self.vm {
|
||||
let info = vm.add_device(device_cfg).map_err(|e| {
|
||||
let info = vm.add_device(device_cfg).inspect_err(|e| {
|
||||
error!("Error when adding new device to the VM: {e:?}");
|
||||
e
|
||||
})?;
|
||||
serde_json::to_vec(&info)
|
||||
.map(Some)
|
||||
@@ -1903,9 +1902,8 @@ impl RequestHandler for Vmm {
|
||||
}
|
||||
|
||||
if let Some(ref mut vm) = self.vm {
|
||||
let info = vm.add_user_device(device_cfg).map_err(|e| {
|
||||
let info = vm.add_user_device(device_cfg).inspect_err(|e| {
|
||||
error!("Error when adding new user device to the VM: {e:?}");
|
||||
e
|
||||
})?;
|
||||
serde_json::to_vec(&info)
|
||||
.map(Some)
|
||||
|
||||
Reference in New Issue
Block a user