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.
--- 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) {