From ffd6fbb6b65340c95e0654ffad2adb63cab57aad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 2 Jan 2023 13:21:27 +0100 Subject: [PATCH] logging: Fix 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/libs/logging/src/file_rotate.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libs/logging/src/file_rotate.rs b/src/libs/logging/src/file_rotate.rs index 444297e53..3cc8f5715 100644 --- a/src/libs/logging/src/file_rotate.rs +++ b/src/libs/logging/src/file_rotate.rs @@ -168,12 +168,12 @@ impl FileRotator { #[cfg(test)] if !self.fail_rename && self.path.exists() { let rotated_path = self.rotated_path(1); - let _ = fs::rename(&self.path, &rotated_path); + let _ = fs::rename(&self.path, rotated_path); } #[cfg(not(test))] if self.path.exists() { 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);