mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 05:35:20 +00:00
vm-migration: Simplify SnapshotData implementation
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
1d1043316b
commit
426ee39972
@ -109,9 +109,7 @@ impl SnapshotData {
|
||||
let data = serde_json::to_vec(state)
|
||||
.map_err(|e| MigratableError::Snapshot(anyhow!("Error serialising: {}", e)))?;
|
||||
|
||||
let snapshot_data = SnapshotData(data);
|
||||
|
||||
Ok(snapshot_data)
|
||||
Ok(SnapshotData(data))
|
||||
}
|
||||
|
||||
/// Create from versioned state
|
||||
@ -124,9 +122,7 @@ impl SnapshotData {
|
||||
.serialize(&mut data, &T::version_map(), VMM_VERSION)
|
||||
.map_err(|e| MigratableError::Snapshot(anyhow!("Error serialising: {}", e)))?;
|
||||
|
||||
let snapshot_data = SnapshotData(data);
|
||||
|
||||
Ok(snapshot_data)
|
||||
Ok(SnapshotData(data))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user