1
Fork 0

fix comment spacing

This commit is contained in:
Maxwell Anderson 2018-11-01 12:35:01 -06:00 committed by GitHub
parent 98ce3348d9
commit 02340cc891
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -557,6 +557,7 @@ impl LiteralRepresentation {
// Lint for Literals with a hex-representation of 2 or 3 digits
let f = &digits[0..1]; // first digit
let s = &digits[1..]; // suffix
// Powers of 2
if ((f.eq("1") || f.eq("2") || f.eq("4") || f.eq("8")) && s.chars().all(|c| c == '0'))
// Powers of 2 minus 1
@ -569,6 +570,7 @@ impl LiteralRepresentation {
let f = &digits[0..1]; // first digit
let m = &digits[1..digits.len() - 1]; // middle digits, except last
let s = &digits[1..]; // suffix
// Powers of 2 with a margin of +15/-16
if ((f.eq("1") || f.eq("2") || f.eq("4") || f.eq("8")) && m.chars().all(|c| c == '0'))
|| ((f.eq("1") || f.eq("3") || f.eq("7") || f.eq("F")) && m.chars().all(|c| c == 'F'))