mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Use hex literal for INDEX_MASK
This commit is contained in:
parent
355e1dda1d
commit
54f55efb9a
@ -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() {
|
||||
|
@ -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');
|
||||
|
Loading…
Reference in New Issue
Block a user