File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -297,9 +297,9 @@ fn run_utf8_validation_rt(bytes: &[u8]) -> Result<(), Utf8Error> {
297
297
// Fast path: if the current state is ACCEPT, we can skip to the next non-ASCII chunk.
298
298
// We also did a quick inspection on the first byte to avoid getting into this path at all
299
299
// when handling strings with almost no ASCII, eg. Chinese scripts.
300
- // SAFETY: `i` is inbound .
300
+ // SAFETY: `i` is in bound .
301
301
if st == ST_ACCEPT && unsafe { * bytes. get_unchecked ( i) } < 0x80 {
302
- // SAFETY: `i` is inbound .
302
+ // SAFETY: `i` is in bound .
303
303
let rest = unsafe { bytes. get_unchecked ( i..) } ;
304
304
let mut ascii_chunks = rest. array_chunks :: < ASCII_CHUNK_SIZE > ( ) ;
305
305
let ascii_rest_chunk_cnt = ascii_chunks. len ( ) ;
@@ -318,7 +318,7 @@ fn run_utf8_validation_rt(bytes: &[u8]) -> Result<(), Utf8Error> {
318
318
}
319
319
}
320
320
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.
322
322
let chunk = unsafe { & * bytes. as_ptr ( ) . add ( i) . cast :: < [ u8 ; MAIN_CHUNK_SIZE ] > ( ) } ;
323
323
let mut new_st = st;
324
324
for & b in chunk {
You can’t perform that action at this time.
0 commit comments