@@ -87,17 +87,17 @@ cfg_match! {
87
87
88
88
// For character in the chunk, see if its byte value is < 0, which
89
89
// indicates that it's part of a UTF-8 char.
90
- let multibyte_test = unsafe { _mm_cmplt_epi8( chunk, _mm_set1_epi8( 0 ) ) } ;
90
+ let multibyte_test = _mm_cmplt_epi8( chunk, _mm_set1_epi8( 0 ) ) ;
91
91
// Create a bit mask from the comparison results.
92
- let multibyte_mask = unsafe { _mm_movemask_epi8( multibyte_test) } ;
92
+ let multibyte_mask = _mm_movemask_epi8( multibyte_test) ;
93
93
94
94
// If the bit mask is all zero, we only have ASCII chars here:
95
95
if multibyte_mask == 0 {
96
96
assert!( intra_chunk_offset == 0 ) ;
97
97
98
98
// Check for newlines in the chunk
99
- let newlines_test = unsafe { _mm_cmpeq_epi8( chunk, _mm_set1_epi8( b'\n' as i8 ) ) } ;
100
- let mut newlines_mask = unsafe { _mm_movemask_epi8( newlines_test) } ;
99
+ let newlines_test = _mm_cmpeq_epi8( chunk, _mm_set1_epi8( b'\n' as i8 ) ) ;
100
+ let mut newlines_mask = _mm_movemask_epi8( newlines_test) ;
101
101
102
102
let output_offset = RelativeBytePos :: from_usize( chunk_index * CHUNK_SIZE + 1 ) ;
103
103
@@ -212,17 +212,17 @@ cfg_match! {
212
212
213
213
// For character in the chunk, see if its byte value is < 0, which
214
214
// indicates that it's part of a UTF-8 char.
215
- let multibyte_test = unsafe { _mm_cmplt_epi8( chunk, _mm_set1_epi8( 0 ) ) } ;
215
+ let multibyte_test = _mm_cmplt_epi8( chunk, _mm_set1_epi8( 0 ) ) ;
216
216
// Create a bit mask from the comparison results.
217
- let multibyte_mask = unsafe { _mm_movemask_epi8( multibyte_test) } ;
217
+ let multibyte_mask = _mm_movemask_epi8( multibyte_test) ;
218
218
219
219
// If the bit mask is all zero, we only have ASCII chars here:
220
220
if multibyte_mask == 0 {
221
221
assert!( intra_chunk_offset == 0 ) ;
222
222
223
223
// Check for newlines in the chunk
224
- let newlines_test = unsafe { _mm_cmpeq_epi8( chunk, _mm_set1_epi8( b'\n' as i8 ) ) } ;
225
- let mut newlines_mask = unsafe { _mm_movemask_epi8( newlines_test) } ;
224
+ let newlines_test = _mm_cmpeq_epi8( chunk, _mm_set1_epi8( b'\n' as i8 ) ) ;
225
+ let mut newlines_mask = _mm_movemask_epi8( newlines_test) ;
226
226
227
227
let output_offset = RelativeBytePos :: from_usize( chunk_index * CHUNK_SIZE + 1 ) ;
228
228
0 commit comments