mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-18 18:45:19 +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)
|
let data = serde_json::to_vec(state)
|
||||||
.map_err(|e| MigratableError::Snapshot(anyhow!("Error serialising: {}", e)))?;
|
.map_err(|e| MigratableError::Snapshot(anyhow!("Error serialising: {}", e)))?;
|
||||||
|
|
||||||
let snapshot_data = SnapshotData(data);
|
Ok(SnapshotData(data))
|
||||||
|
|
||||||
Ok(snapshot_data)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Create from versioned state
|
/// Create from versioned state
|
||||||
@ -124,9 +122,7 @@ impl SnapshotData {
|
|||||||
.serialize(&mut data, &T::version_map(), VMM_VERSION)
|
.serialize(&mut data, &T::version_map(), VMM_VERSION)
|
||||||
.map_err(|e| MigratableError::Snapshot(anyhow!("Error serialising: {}", e)))?;
|
.map_err(|e| MigratableError::Snapshot(anyhow!("Error serialising: {}", e)))?;
|
||||||
|
|
||||||
let snapshot_data = SnapshotData(data);
|
Ok(SnapshotData(data))
|
||||||
|
|
||||||
Ok(snapshot_data)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user