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 <rbradford@meta.com>
This commit is contained in:
Rob Bradford
2026-03-15 02:49:13 -07:00
parent 93d8896042
commit 0a7e32c312

View File

@@ -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);