mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-24 01:24:26 +01:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user