Skip to content

Commit

Permalink
add #inline
Browse files Browse the repository at this point in the history
  • Loading branch information
bmacnaughton committed Jul 20, 2022
1 parent e5d4de3 commit 5d048eb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/unicode/unicode_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,7 @@ pub mod white_space {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0,
];
#[inline]
pub fn lookup(c: char) -> bool {
match c as u32 >> 8 {
0 => WHITESPACE_MAP[c as usize & 0xff] & 1 != 0,
Expand Down
1 change: 1 addition & 0 deletions src/tools/unicode-table-generator/src/cascading_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ impl RawEmitter {
.unwrap();
self.bytes_used += 256;

writeln!(&mut self.file, "#[inline]").unwrap();
writeln!(&mut self.file, "pub fn lookup(c: char) -> bool {{").unwrap();
writeln!(&mut self.file, " match c as u32 >> 8 {{").unwrap();
for arm in arms {
Expand Down

0 comments on commit 5d048eb

Please sign in to comment.