Skip to content

Commit 54f55ef

Browse files
committed
Use hex literal for INDEX_MASK
1 parent 355e1dd commit 54f55ef

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

library/core/src/unicode/unicode_data.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ pub mod white_space {
580580

581581
#[rustfmt::skip]
582582
pub mod conversions {
583-
const INDEX_MASK: u32 = 4194304;
583+
const INDEX_MASK: u32 = 0x400000;
584584

585585
pub fn to_lower(c: char) -> [char; 3] {
586586
if c.is_ascii() {

src/tools/unicode-table-generator/src/case_mapping.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const INDEX_MASK: u32 = 1 << 22;
1010
pub(crate) fn generate_case_mapping(data: &UnicodeData) -> String {
1111
let mut file = String::new();
1212

13-
write!(file, "const INDEX_MASK: u32 = {};", INDEX_MASK).unwrap();
13+
write!(file, "const INDEX_MASK: u32 = 0x{:x};", INDEX_MASK).unwrap();
1414
file.push_str("\n\n");
1515
file.push_str(HEADER.trim_start());
1616
file.push('\n');

0 commit comments

Comments
 (0)