File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -557,7 +557,8 @@ impl LiteralRepresentation {
557
557
// Lint for Literals with a hex-representation of 2 or 3 digits
558
558
let f = & digits[ 0 ..1 ] ; // first digit
559
559
let s = & digits[ 1 ..] ; // suffix
560
- // Powers of 2
560
+
561
+ // Powers of 2
561
562
if ( ( f. eq ( "1" ) || f. eq ( "2" ) || f. eq ( "4" ) || f. eq ( "8" ) ) && s. chars ( ) . all ( |c| c == '0' ) )
562
563
// Powers of 2 minus 1
563
564
|| ( ( f. eq ( "1" ) || f. eq ( "3" ) || f. eq ( "7" ) || f. eq ( "F" ) ) && s. chars ( ) . all ( |c| c == 'F' ) )
@@ -569,7 +570,8 @@ impl LiteralRepresentation {
569
570
let f = & digits[ 0 ..1 ] ; // first digit
570
571
let m = & digits[ 1 ..digits. len ( ) - 1 ] ; // middle digits, except last
571
572
let s = & digits[ 1 ..] ; // suffix
572
- // Powers of 2 with a margin of +15/-16
573
+
574
+ // Powers of 2 with a margin of +15/-16
573
575
if ( ( f. eq ( "1" ) || f. eq ( "2" ) || f. eq ( "4" ) || f. eq ( "8" ) ) && m. chars ( ) . all ( |c| c == '0' ) )
574
576
|| ( ( f. eq ( "1" ) || f. eq ( "3" ) || f. eq ( "7" ) || f. eq ( "F" ) ) && m. chars ( ) . all ( |c| c == 'F' ) )
575
577
// Lint for representations with only 0s and Fs, while allowing 7 as the first
You can’t perform that action at this time.
0 commit comments