Always inline run_utf8_validation
.
It only has two call sites, and the one within `from_utf8` is hot within rustc itself.
This commit is contained in:
parent
5e7af4669f
commit
ab906179cc
1 changed files with 1 additions and 1 deletions
|
@ -1499,7 +1499,7 @@ fn contains_nonascii(x: usize) -> bool {
|
|||
|
||||
/// Walks through `v` checking that it's a valid UTF-8 sequence,
|
||||
/// returning `Ok(())` in that case, or, if it is invalid, `Err(err)`.
|
||||
#[inline]
|
||||
#[inline(always)]
|
||||
fn run_utf8_validation(v: &[u8]) -> Result<(), Utf8Error> {
|
||||
let mut index = 0;
|
||||
let len = v.len();
|
||||
|
|
Loading…
Reference in a new issue