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:
@@ -727,10 +727,7 @@ impl Mem {
|
||||
if region_len != region_len / VIRTIO_MEM_ALIGN_SIZE * VIRTIO_MEM_ALIGN_SIZE {
|
||||
return Err(io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!(
|
||||
"Virtio-mem size is not aligned with {}",
|
||||
VIRTIO_MEM_ALIGN_SIZE
|
||||
),
|
||||
format!("Virtio-mem size is not aligned with {VIRTIO_MEM_ALIGN_SIZE}"),
|
||||
));
|
||||
}
|
||||
|
||||
@@ -756,8 +753,7 @@ impl Mem {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!(
|
||||
"Failed to resize virtio-mem configuration to {}: {:?}",
|
||||
initial_size, e
|
||||
"Failed to resize virtio-mem configuration to {initial_size}: {e:?}"
|
||||
),
|
||||
)
|
||||
})?;
|
||||
@@ -773,7 +769,7 @@ impl Mem {
|
||||
config.validate().map_err(|e| {
|
||||
io::Error::new(
|
||||
io::ErrorKind::Other,
|
||||
format!("Invalid virtio-mem configuration: {:?}", e),
|
||||
format!("Invalid virtio-mem configuration: {e:?}"),
|
||||
)
|
||||
})?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user