From 29f392f8d458b619fa950ed9ea0da45cf6994637 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Wed, 27 May 2026 13:12:28 +0100 Subject: [PATCH] tests: Fix clippy: uninlined_format_args Replace format arguments with inlined versions. Signed-off-by: Rob Bradford --- cloud-hypervisor/tests/common/utils.rs | 4 ++-- cloud-hypervisor/tests/integration.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cloud-hypervisor/tests/common/utils.rs b/cloud-hypervisor/tests/common/utils.rs index f5747f310..5e2967c7a 100644 --- a/cloud-hypervisor/tests/common/utils.rs +++ b/cloud-hypervisor/tests/common/utils.rs @@ -80,7 +80,7 @@ impl TargetApi { if output.status.success() { true } else { - eprintln!("Error running ch-remote command: {:?}", &cmd); + eprintln!("Error running ch-remote command: {cmd:?}"); let stderr = String::from_utf8_lossy(&output.stderr); eprintln!("stderr: {stderr}"); false @@ -1154,7 +1154,7 @@ pub(crate) fn start_live_migration( // Start to send migration from the source VM let args = [ - format!("--api-socket={}", &src_api_socket), + format!("--api-socket={src_api_socket}"), "send-migration".to_string(), format!( "destination_url=unix:{migration_socket},local={}", diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index 455114002..fd32d0cfd 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -3709,7 +3709,7 @@ mod common_parallel { guest.disk_config.disk(DiskType::CloudInit).unwrap() ) .as_str(), - format!("path={},direct=on,image_type=raw", loop_dev).as_str(), + format!("path={loop_dev},direct=on,image_type=raw").as_str(), ]) .default_net() .capture_output() @@ -4350,7 +4350,7 @@ mod common_parallel { guest.disk_config.disk(DiskType::CloudInit).unwrap() ) .as_str(), - format!("path={},image_type=raw", loop_dev).as_str(), + format!("path={loop_dev},image_type=raw").as_str(), ]) .default_net() .capture_output() @@ -4526,7 +4526,7 @@ mod common_parallel { guest.disk_config.disk(DiskType::CloudInit).unwrap() ) .as_str(), - format!("path={},image_type=raw", dm_dev).as_str(), + format!("path={dm_dev},image_type=raw").as_str(), ]) .default_net() .capture_output()