Skip to content

Commit

Permalink
Hint to inline complete_codepoint_len
Browse files Browse the repository at this point in the history
Signed-off-by: Jens Reidel <adrian@travitia.xyz>
  • Loading branch information
Gelbpunkt committed Sep 10, 2024
1 parent 752a6e2 commit b5ae8e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/utf8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ impl Validator {
}

/// The length of the partial codepoint, once complete.
#[inline]
fn complete_codepoint_len(&self) -> usize {
// SAFETY: This is guaranteed to be four bytes large
match unsafe { self.partial_codepoint.get_unchecked(0) } {
Expand Down

0 comments on commit b5ae8e0

Please sign in to comment.