From aed90c2cf8d9c15027c7f5a67e7a42893abbc883 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 21 Aug 2021 21:22:35 -0700 Subject: [PATCH] Ignore if_not_else Clippy pedantic lint error: unnecessary boolean `not` operation --> src/number.rs:367:24 | 367 | } else if !b.is_nan() { | ________________________^ 368 | | Ordering::Greater 369 | | } else { 370 | | Ordering::Equal 371 | | } | |_________________^ | = note: `-D clippy::if-not-else` implied by `-D clippy::pedantic` = help: remove the `!` and swap the blocks of the `if`/`else` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else --- src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib.rs b/src/lib.rs index 8e3b7135..58973290 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -73,6 +73,7 @@ clippy::should_implement_trait, // things are often more readable this way clippy::cast_lossless, + clippy::if_not_else, clippy::match_same_arms, clippy::module_name_repetitions, clippy::needless_pass_by_value,