Skip to content

Commit

Permalink
Fix a clipply
Browse files Browse the repository at this point in the history
  • Loading branch information
ridiculousfish committed Jan 21, 2025
1 parent 87d3c47 commit 317c3df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ pub fn utf8_first_byte(cp: u32) -> u8 {
cp as u8
} else if cp < 0x800 {
// Two byte encoding.
(cp >> 6 & 0x1F) as u8 | 0b1100_0000
((cp >> 6) & 0x1F) as u8 | 0b1100_0000
} else if cp < 0x10000 {
// Three byte encoding.
(cp >> 12 & 0x0F) as u8 | 0b1110_0000
((cp >> 12) & 0x0F) as u8 | 0b1110_0000
} else {
// Four byte encoding.
(cp >> 18 & 0x07) as u8 | 0b1111_0000
((cp >> 18) & 0x07) as u8 | 0b1111_0000
}
}

Expand Down

0 comments on commit 317c3df

Please sign in to comment.