Skip to content

Commit 194dd37

Browse files
committed
use separators in long literals
1 parent 81a1804 commit 194dd37

File tree

2 files changed

+21
-21
lines changed

2 files changed

+21
-21
lines changed

src/finding.rs

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,12 @@ mod tests {
473473
static M1: Mission = Mission {
474474
encoding: encoding::all::ASCII,
475475
filter1: UnicodeBlockFilter {
476-
and_mask: 0xffe00000,
476+
and_mask: 0xffe0_0000,
477477
and_result: 0,
478478
is_some: false,
479479
},
480480
filter2: UnicodeBlockFilter {
481-
and_mask: 0xffe00000,
481+
and_mask: 0xffe0_0000,
482482
and_result: 0,
483483
is_some: false,
484484
},
@@ -515,12 +515,12 @@ mod tests {
515515
static M2: Mission = Mission {
516516
encoding: encoding::all::ASCII,
517517
filter1: UnicodeBlockFilter {
518-
and_mask: 0xffe00000,
518+
and_mask: 0xffe0_0000,
519519
and_result: 0,
520520
is_some: false,
521521
},
522522
filter2: UnicodeBlockFilter {
523-
and_mask: 0xffe00000,
523+
and_mask: 0xffe0_0000,
524524
and_result: 0,
525525
is_some: false,
526526
},
@@ -558,12 +558,12 @@ mod tests {
558558
static M3: Mission = Mission {
559559
encoding: encoding::all::ASCII,
560560
filter1: UnicodeBlockFilter {
561-
and_mask: 0xffe00000,
561+
and_mask: 0xffe0_0000,
562562
and_result: 0,
563563
is_some: false,
564564
},
565565
filter2: UnicodeBlockFilter {
566-
and_mask: 0xffe00000,
566+
and_mask: 0xffe0_0000,
567567
and_result: 0,
568568
is_some: false,
569569
},
@@ -600,12 +600,12 @@ mod tests {
600600
static M4: Mission = Mission {
601601
encoding: encoding::all::ASCII,
602602
filter1: UnicodeBlockFilter {
603-
and_mask: 0xffe00000,
603+
and_mask: 0xffe0_0000,
604604
and_result: 0,
605605
is_some: false,
606606
},
607607
filter2: UnicodeBlockFilter {
608-
and_mask: 0xffe00000,
608+
and_mask: 0xffe0_0000,
609609
and_result: 0,
610610
is_some: false,
611611
},
@@ -642,12 +642,12 @@ mod tests {
642642
static M5: Mission = Mission {
643643
encoding: encoding::all::ASCII,
644644
filter1: UnicodeBlockFilter {
645-
and_mask: 0xffe00000,
645+
and_mask: 0xffe0_0000,
646646
and_result: 0,
647647
is_some: false,
648648
},
649649
filter2: UnicodeBlockFilter {
650-
and_mask: 0xffe00000,
650+
and_mask: 0xffe0_0000,
651651
and_result: 0,
652652
is_some: false,
653653
},
@@ -685,12 +685,12 @@ mod tests {
685685
static M6: Mission = Mission {
686686
encoding: encoding::all::ASCII,
687687
filter1: UnicodeBlockFilter {
688-
and_mask: 0xffe00000,
688+
and_mask: 0xffe0_0000,
689689
and_result: 0,
690690
is_some: false,
691691
},
692692
filter2: UnicodeBlockFilter {
693-
and_mask: 0xffe00000,
693+
and_mask: 0xffe0_0000,
694694
and_result: 0,
695695
is_some: false,
696696
},
@@ -728,12 +728,12 @@ mod tests {
728728
static M7: Mission = Mission {
729729
encoding: encoding::all::ASCII,
730730
filter1: UnicodeBlockFilter {
731-
and_mask: 0xffe00000,
731+
and_mask: 0xffe0_0000,
732732
and_result: 0,
733733
is_some: false,
734734
},
735735
filter2: UnicodeBlockFilter {
736-
and_mask: 0xffe00000,
736+
and_mask: 0xffe0_0000,
737737
and_result: 0,
738738
is_some: false,
739739
},
@@ -770,12 +770,12 @@ mod tests {
770770
static M8: Mission = Mission {
771771
encoding: encoding::all::ASCII,
772772
filter1: UnicodeBlockFilter {
773-
and_mask: 0xffe00000,
773+
and_mask: 0xffe0_0000,
774774
and_result: 0,
775775
is_some: false,
776776
},
777777
filter2: UnicodeBlockFilter {
778-
and_mask: 0xffe00000,
778+
and_mask: 0xffe0_0000,
779779
and_result: 0,
780780
is_some: false,
781781
},
@@ -818,12 +818,12 @@ mod tests {
818818
static M9: Mission = Mission {
819819
encoding: encoding::all::ASCII,
820820
filter1: UnicodeBlockFilter {
821-
and_mask: 0xffe00000,
821+
and_mask: 0xffe0_0000,
822822
and_result: 0,
823823
is_some: false,
824824
},
825825
filter2: UnicodeBlockFilter {
826-
and_mask: 0xffe00000,
826+
and_mask: 0xffe0_0000,
827827
and_result: 0,
828828
is_some: false,
829829
},

src/mission.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub struct UnicodeBlockFilter {
3838

3939
/// Is this `and_mask`, `and_result` filtering anything?
4040
/// This information is redundant because:
41-
/// `is_some = (and_mask == 0xffe00000) && (and_result == 0x0)`
41+
/// `is_some = (and_mask == 0xffe0_0000) && (and_result == 0x0)`
4242
/// It is precalculated to speed up later operations.
4343
pub is_some: bool,
4444
}
@@ -47,7 +47,7 @@ pub struct UnicodeBlockFilter {
4747
impl UnicodeBlockFilter {
4848
/// This constructs a non-restricting filter letting pass all characters.
4949
pub fn new() -> Self {
50-
// This calculates: 0xffe00000
50+
// This calculates: 0xffe0_0000
5151
let and_mask_all = !((std::char::MAX as u32).next_power_of_two() - 1);
5252
UnicodeBlockFilter {
5353
and_mask: and_mask_all,
@@ -302,7 +302,7 @@ impl Missions {
302302
let u_and_result = u_lower_ext;
303303

304304
// Check if the filter is restrictive
305-
// filtering = (and_mask == 0xffe00000) && (and_result == 0x0)
305+
// filtering = (and_mask == 0xffe0_0000) && (and_result == 0x0)
306306
let filtering = !(u_and_mask == !((std::char::MAX as u32).next_power_of_two() - 1)
307307
&& u_and_result == 0);
308308

0 commit comments

Comments
 (0)