mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-10-05 13:05:45 +00:00
hypervisor, vmm: fix clippy warnings
Signed-off-by: Praveen Paladugu <prapal@microsoft.com>
This commit is contained in:
parent
6ebeaa9246
commit
4b32252028
@ -342,7 +342,7 @@ impl vm::Vm for KvmVm {
|
|||||||
///
|
///
|
||||||
/// Set the VM state
|
/// Set the VM state
|
||||||
///
|
///
|
||||||
fn set_state(&self, _state: &VmState) -> vm::Result<()> {
|
fn set_state(&self, _state: VmState) -> vm::Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,5 +183,5 @@ pub trait Vm: Send + Sync {
|
|||||||
/// Get the Vm state. Return VM specific data
|
/// Get the Vm state. Return VM specific data
|
||||||
fn state(&self) -> Result<VmState>;
|
fn state(&self) -> Result<VmState>;
|
||||||
/// Set the VM state
|
/// Set the VM state
|
||||||
fn set_state(&self, state: &VmState) -> Result<()>;
|
fn set_state(&self, state: VmState) -> Result<()>;
|
||||||
}
|
}
|
||||||
|
@ -537,7 +537,7 @@ impl Vm {
|
|||||||
let vm_snapshot = get_vm_snapshot(snapshot).map_err(Error::Restore)?;
|
let vm_snapshot = get_vm_snapshot(snapshot).map_err(Error::Restore)?;
|
||||||
let config = vm_snapshot.config;
|
let config = vm_snapshot.config;
|
||||||
if let Some(state) = vm_snapshot.state {
|
if let Some(state) = vm_snapshot.state {
|
||||||
vm.set_state(&state)
|
vm.set_state(state)
|
||||||
.map_err(|e| Error::Restore(MigratableError::Restore(e.into())))?;
|
.map_err(|e| Error::Restore(MigratableError::Restore(e.into())))?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user