Allow hex literals to pass w/ groups of 2

This commit is contained in:
cgm616 2020-10-25 09:18:06 -04:00
parent db8380c4a0
commit f5a88b6de5

View file

@ -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 != 0) {
if (radix == Radix::Binary || radix == Radix::Hexadecimal) && groups.any(|i| i != 4 || i != 2) {
return Err(WarningType::UnusualByteGrouping);
}