Skip to content

Commit

Permalink
Modify codegen script to make lookup a const fn
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed May 17, 2021
1 parent d28adf1 commit cda2e47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/gen_case_lookups.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
#[must_use]
#[allow(clippy::match_same_arms)]
#[allow(clippy::too_many_lines)]
pub fn lookup(c: char, mode: Mode) -> Mapping {
pub const fn lookup(c: char, mode: Mode) -> Mapping {
let codepoint = c as u32;
let char_bytes = codepoint.to_be_bytes();
let mid_byte = char_bytes[2];
Expand Down

0 comments on commit cda2e47

Please sign in to comment.