Skip to content

Commit db2031a

Browse files
author
Oliver Giersch
committed
restore accidentally overwritten fn signature
1 parent eab17e7 commit db2031a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

library/core/src/str/validations.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,11 @@ const fn block_end(end: usize, block_size: usize) -> usize {
369369
if end >= block_size { end - block_size + 1 } else { 0 }
370370
}
371371

372-
#[inline(always)]
373-
const fn utf8_char_width(byte: u8) -> usize {
372+
/// Given a first byte, determines how many bytes are in this UTF-8 character.
373+
#[unstable(feature = "str_internals", issue = "none")]
374+
#[must_use]
375+
#[inline]
376+
pub const fn utf8_char_width(byte: u8) -> usize {
374377
// https://tools.ietf.org/html/rfc3629
375378
const UTF8_CHAR_WIDTH: [u8; 256] = [
376379
// 1 2 3 4 5 6 7 8 9 A B C D E F

0 commit comments

Comments
 (0)