Skip to content

Commit d2030aa

Browse files
committed
Fix typo
1 parent dbef33f commit d2030aa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

library/core/src/str/validations.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -297,9 +297,9 @@ fn run_utf8_validation_rt(bytes: &[u8]) -> Result<(), Utf8Error> {
297297
// Fast path: if the current state is ACCEPT, we can skip to the next non-ASCII chunk.
298298
// We also did a quick inspection on the first byte to avoid getting into this path at all
299299
// when handling strings with almost no ASCII, eg. Chinese scripts.
300-
// SAFETY: `i` is inbound.
300+
// SAFETY: `i` is in bound.
301301
if st == ST_ACCEPT && unsafe { *bytes.get_unchecked(i) } < 0x80 {
302-
// SAFETY: `i` is inbound.
302+
// SAFETY: `i` is in bound.
303303
let rest = unsafe { bytes.get_unchecked(i..) };
304304
let mut ascii_chunks = rest.array_chunks::<ASCII_CHUNK_SIZE>();
305305
let ascii_rest_chunk_cnt = ascii_chunks.len();
@@ -318,7 +318,7 @@ fn run_utf8_validation_rt(bytes: &[u8]) -> Result<(), Utf8Error> {
318318
}
319319
}
320320

321-
// SAFETY: `i` and `i + MAIN_CHUNK_SIZE` are inbound by loop invariant.
321+
// SAFETY: `i` and `i + MAIN_CHUNK_SIZE` are in bound by loop invariant.
322322
let chunk = unsafe { &*bytes.as_ptr().add(i).cast::<[u8; MAIN_CHUNK_SIZE]>() };
323323
let mut new_st = st;
324324
for &b in chunk {

0 commit comments

Comments
 (0)