mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-26 15:32:30 +00:00
logging: 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:
parent
60df30015b
commit
ffd6fbb6b6
@ -168,12 +168,12 @@ impl FileRotator {
|
|||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
if !self.fail_rename && self.path.exists() {
|
if !self.fail_rename && self.path.exists() {
|
||||||
let rotated_path = self.rotated_path(1);
|
let rotated_path = self.rotated_path(1);
|
||||||
let _ = fs::rename(&self.path, &rotated_path);
|
let _ = fs::rename(&self.path, rotated_path);
|
||||||
}
|
}
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
if self.path.exists() {
|
if self.path.exists() {
|
||||||
let rotated_path = self.rotated_path(1);
|
let rotated_path = self.rotated_path(1);
|
||||||
let _ = fs::rename(&self.path, &rotated_path);
|
let _ = fs::rename(&self.path, rotated_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
let delete_path = self.rotated_path(self.rotate_keep + 1);
|
let delete_path = self.rotated_path(self.rotate_keep + 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user