changeset 49918:4158608f7786

rust-clippy: tell clippy we care about keeping those `if` clauses separate Thses were written this way because it spells out the logic in a more explicit manner.
author Raphaël Gomès <rgomes@octobus.net>
date Mon, 09 Jan 2023 18:04:29 +0100
parents 4c71c215bcfe
children bd42bd6eae45
files rust/hg-core/src/dirstate/entry.rs
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rust/hg-core/src/dirstate/entry.rs	Mon Jan 09 18:03:24 2023 +0100
+++ b/rust/hg-core/src/dirstate/entry.rs	Mon Jan 09 18:04:29 2023 +0100
@@ -422,6 +422,7 @@
     }
 
     pub fn maybe_clean(&self) -> bool {
+        #[allow(clippy::if_same_then_else)]
         if !self.flags.contains(Flags::WDIR_TRACKED) {
             false
         } else if !self.flags.contains(Flags::P1_TRACKED) {
@@ -511,6 +512,8 @@
             // TODO: return an Option instead?
             panic!("Accessing v1_mtime of an untracked DirstateEntry")
         }
+
+        #[allow(clippy::if_same_then_else)]
         if self.removed() {
             0
         } else if self.flags.contains(Flags::P2_INFO) {