runtime-rs: Fix needless_borrow warnings

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 <fabiano.fidencio@intel.com>
This commit is contained in:
Fabiano Fidêncio
2023-01-02 16:22:07 +01:00
parent 4fb163d570
commit 025e78341e
6 changed files with 9 additions and 9 deletions

View File

@@ -40,7 +40,7 @@ impl ShimExecutor {
let trim_path = address.strip_prefix("unix://").context("trim path")?;
let file_path = Path::new("/").join(trim_path);
let file_path = file_path.as_path();
if std::fs::metadata(&file_path).is_ok() {
if std::fs::metadata(file_path).is_ok() {
info!(sl!(), "remote socket path: {:?}", &file_path);
fs::remove_file(file_path).ok();
}