From e7e4b35bdf695c4db5a1f34319d01b12a9d54b34 Mon Sep 17 00:00:00 2001 From: cgm616 Date: Sun, 25 Oct 2020 09:34:46 -0400 Subject: [PATCH] Fix logic mistake --- clippy_lints/src/literal_representation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/literal_representation.rs b/clippy_lints/src/literal_representation.rs index 813f3b6f378..f51a0edc9c5 100644 --- a/clippy_lints/src/literal_representation.rs +++ b/clippy_lints/src/literal_representation.rs @@ -368,7 +368,7 @@ impl LiteralDigitGrouping { let first = groups.next().expect("At least one group"); - if (radix == Radix::Binary || radix == Radix::Hexadecimal) && groups.any(|i| i != 4 || i != 2) { + if (radix == Radix::Binary || radix == Radix::Hexadecimal) && groups.any(|i| i != 4 && i != 2) { return Err(WarningType::UnusualByteGrouping); }