mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
misc: Automatically fix cargo clippy issues added in 1.65 (stable)
The code of the stable branch diverges from the main branch, so we
can't directly backport the corresponding commit to fix the clippy
issues.
See: commit 5e52729453
Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
@@ -121,7 +121,7 @@ impl SnapshotDataSection {
|
||||
.map_err(|e| MigratableError::Snapshot(anyhow!("Error serialising: {} {}", id, e)))?;
|
||||
|
||||
let snapshot_data = SnapshotDataSection {
|
||||
id: format!("{}-section", id),
|
||||
id: format!("{id}-section"),
|
||||
snapshot,
|
||||
};
|
||||
|
||||
@@ -139,7 +139,7 @@ impl SnapshotDataSection {
|
||||
.map_err(|e| MigratableError::Snapshot(anyhow!("Error serialising: {} {}", id, e)))?;
|
||||
|
||||
let snapshot_data = SnapshotDataSection {
|
||||
id: format!("{}-section", id),
|
||||
id: format!("{id}-section"),
|
||||
snapshot,
|
||||
};
|
||||
|
||||
@@ -219,7 +219,7 @@ impl Snapshot {
|
||||
T: Deserialize<'a>,
|
||||
{
|
||||
self.snapshot_data
|
||||
.get(&format!("{}-section", id))
|
||||
.get(&format!("{id}-section"))
|
||||
.ok_or_else(|| MigratableError::Restore(anyhow!("Missing section for {}", id)))?
|
||||
.to_state()
|
||||
}
|
||||
@@ -230,7 +230,7 @@ impl Snapshot {
|
||||
T: Versionize + VersionMapped,
|
||||
{
|
||||
self.snapshot_data
|
||||
.get(&format!("{}-section", id))
|
||||
.get(&format!("{id}-section"))
|
||||
.ok_or_else(|| MigratableError::Restore(anyhow!("Missing section for {}", id)))?
|
||||
.to_versioned_state()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user