File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -252,12 +252,12 @@ const fn next_state(st: u32, byte: u8) -> u32 {
252252
253253#[ cfg( any( target_pointer_width = "16" , target_pointer_width = "32" ) ) ]
254254#[ inline( always) ]
255- fn next_state ( st : u32 , byte : u8 ) -> u32 {
255+ const fn next_state ( st : u32 , byte : u8 ) -> u32 {
256256 // SAFETY: `u64` is more aligned than `u32`, and has the same repr as `[u32; 2]`.
257- let [ lo, hi] = unsafe { std :: mem:: transmute :: < u64 , [ u32 ; 2 ] > ( TRANS_TABLE [ byte as usize ] ) } ;
257+ let [ lo, hi] = unsafe { crate :: mem:: transmute :: < u64 , [ u32 ; 2 ] > ( TRANS_TABLE [ byte as usize ] ) } ;
258258 #[ cfg( target_endian = "big" ) ]
259259 let ( lo, hi) = ( hi, lo) ;
260- ( st & 32 == 0 ) . select_unpredictable ( lo , hi ) . wrapping_shr ( st)
260+ if st & 32 == 0 { lo } else { hi } . wrapping_shr ( st)
261261}
262262
263263/// Check if `byte` is a valid UTF-8 first byte, assuming it must be a valid first or
You can’t perform that action at this time.
0 commit comments