about summary refs log tree commit diff
diff options
context:
space:
mode:
authorcgm616 <cgm616@me.com>2020-10-25 09:34:46 -0400
committercgm616 <cgm616@me.com>2020-10-25 09:34:46 -0400
commite7e4b35bdf695c4db5a1f34319d01b12a9d54b34 (patch)
treefd20e1af7b447067bd2e22d57da9a98b39b34a98
parent0c0f8db347e406682875fcd08d2bc483e93f710f (diff)
downloadrust-e7e4b35bdf695c4db5a1f34319d01b12a9d54b34.tar.gz
rust-e7e4b35bdf695c4db5a1f34319d01b12a9d54b34.zip
Fix logic mistake
-rw-r--r--clippy_lints/src/literal_representation.rs2
1 files changed, 1 insertions, 1 deletions
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);
         }