Skip to content

Commit

Permalink
Inline u8::is_utf8_char_boundary
Browse files Browse the repository at this point in the history
  • Loading branch information
KamilaBorowska committed Mar 28, 2022
1 parent 2d37f38 commit 12c085a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions library/core/src/num/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,7 @@ impl u8 {
ascii::escape_default(self)
}

#[inline]
pub(crate) const fn is_utf8_char_boundary(self) -> bool {
// This is bit magic equivalent to: b < 128 || b >= 192
(self as i8) >= -0x40
Expand Down

0 comments on commit 12c085a

Please sign in to comment.