From 0a7e32c31217af05102e9b30b1da4453b5061389 Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Sun, 15 Mar 2026 02:49:13 -0700 Subject: [PATCH] tests: Fix clippy issue related to unnecessary use of .to_string() error: unnecessary use of `to_string` --> cloud-hypervisor/tests/integration.rs:6765:38 | 6765 | exec_host_command_output(&"sudo dd if=/dev/zero of=/tmp/resize.img bs=1M count=16".to_string()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `"sudo dd if=/dev/zero of=/tmp/resize.img bs=1M count=16"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned = note: `-D clippy::unnecessary-to-owned` implied by `-D clippy::all` = help: to override `-D clippy::all` add `#[allow(clippy::unnecessary_to_owned)]` Signed-off-by: Rob Bradford --- cloud-hypervisor/tests/integration.rs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cloud-hypervisor/tests/integration.rs b/cloud-hypervisor/tests/integration.rs index 730b5b468..d48b18adb 100644 --- a/cloud-hypervisor/tests/integration.rs +++ b/cloud-hypervisor/tests/integration.rs @@ -6762,11 +6762,9 @@ mod common_parallel { // Create a disk image that we can write to assert!( - exec_host_command_output( - &"sudo dd if=/dev/zero of=/tmp/resize.img bs=1M count=16".to_string() - ) - .status - .success() + exec_host_command_output("sudo dd if=/dev/zero of=/tmp/resize.img bs=1M count=16") + .status + .success() ); let mut cmd = GuestCommand::new(&guest);