Skip to content

Commit 5d048eb

Browse files
committed
add #inline
1 parent e5d4de3 commit 5d048eb

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

library/core/src/unicode/unicode_data.rs

+1
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ pub mod white_space {
555555
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,
556556
0, 0, 0, 0, 0, 0, 0, 0, 0,
557557
];
558+
#[inline]
558559
pub fn lookup(c: char) -> bool {
559560
match c as u32 >> 8 {
560561
0 => WHITESPACE_MAP[c as usize & 0xff] & 1 != 0,

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

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ impl RawEmitter {
6363
.unwrap();
6464
self.bytes_used += 256;
6565

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

0 commit comments

Comments
 (0)