Use hex literal for INDEX_MASK

This commit is contained in:
Martin Gammelsæter 2023-03-21 09:59:47 +01:00
parent 355e1dda1d
commit 54f55efb9a
2 changed files with 2 additions and 2 deletions

View File

@ -580,7 +580,7 @@ pub mod white_space {
#[rustfmt::skip]
pub mod conversions {
const INDEX_MASK: u32 = 4194304;
const INDEX_MASK: u32 = 0x400000;
pub fn to_lower(c: char) -> [char; 3] {
if c.is_ascii() {

View File

@ -10,7 +10,7 @@ const INDEX_MASK: u32 = 1 << 22;
pub(crate) fn generate_case_mapping(data: &UnicodeData) -> String {
let mut file = String::new();
write!(file, "const INDEX_MASK: u32 = {};", INDEX_MASK).unwrap();
write!(file, "const INDEX_MASK: u32 = 0x{:x};", INDEX_MASK).unwrap();
file.push_str("\n\n");
file.push_str(HEADER.trim_start());
file.push('\n');