From eaf72daa8059ee77a1890d38a6606a484a5fa4cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 2 Jan 2023 15:38:04 +0100 Subject: [PATCH] agent: Fix CCv0 specific needless_borrow warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As we bumped the rust toolchain to 1.66.0, some new warnings have been raised due to needless_borrow. Let's fix them all here. For more info about the warnings, please, take a look at: https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow Signed-off-by: Fabiano FidĂȘncio --- src/agent/src/image_rpc.rs | 2 +- src/agent/src/rpc.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/src/image_rpc.rs b/src/agent/src/image_rpc.rs index 4592c684e3..1dcf98e49b 100644 --- a/src/agent/src/image_rpc.rs +++ b/src/agent/src/image_rpc.rs @@ -156,7 +156,7 @@ impl ImageService { } info!(sl!(), "use guest pause image cid {:?}", cid); - let pause_bundle = Path::new(CONTAINER_BASE).join(&cid); + let pause_bundle = Path::new(CONTAINER_BASE).join(cid); let pause_rootfs = pause_bundle.join("rootfs"); let pause_config = pause_bundle.join(CONFIG_JSON); let pause_binary = pause_rootfs.join("pause"); diff --git a/src/agent/src/rpc.rs b/src/agent/src/rpc.rs index 903c836381..ce82f6c05e 100644 --- a/src/agent/src/rpc.rs +++ b/src/agent/src/rpc.rs @@ -247,7 +247,7 @@ impl AgentService { ); Command::new(INIT_TRUSTED_STORAGE) - .args(&[&dev_major_minor, &data_integrity.to_string()]) + .args([&dev_major_minor, &data_integrity.to_string()]) .output() .expect("Failed to initialize confidential storage"); }