@@ -59,7 +59,7 @@ impl Vector for __m16i {
5959 #[ inline]
6060 #[ target_feature( enable = "avx2" ) ]
6161 unsafe fn to_bitmask ( a : Self ) -> u32 {
62- std :: mem :: transmute ( _mm_movemask_epi8 ( a. 0 ) & 0x3 )
62+ i32 :: cast_unsigned ( _mm_movemask_epi8 ( a. 0 ) & 0x3 )
6363 }
6464}
6565
@@ -106,7 +106,7 @@ impl Vector for __m32i {
106106 #[ inline]
107107 #[ target_feature( enable = "avx2" ) ]
108108 unsafe fn to_bitmask ( a : Self ) -> u32 {
109- std :: mem :: transmute ( _mm_movemask_epi8 ( a. 0 ) & 0xF )
109+ i32 :: cast_unsigned ( _mm_movemask_epi8 ( a. 0 ) & 0xF )
110110 }
111111}
112112
@@ -153,7 +153,7 @@ impl Vector for __m64i {
153153 #[ inline]
154154 #[ target_feature( enable = "avx2" ) ]
155155 unsafe fn to_bitmask ( a : Self ) -> u32 {
156- std :: mem :: transmute ( _mm_movemask_epi8 ( a. 0 ) & 0xFF )
156+ i32 :: cast_unsigned ( _mm_movemask_epi8 ( a. 0 ) & 0xFF )
157157 }
158158}
159159
@@ -195,7 +195,7 @@ impl Vector for __m128i {
195195 #[ inline]
196196 #[ target_feature( enable = "avx2" ) ]
197197 unsafe fn to_bitmask ( a : Self ) -> u32 {
198- std :: mem :: transmute ( _mm_movemask_epi8 ( a) )
198+ i32 :: cast_unsigned ( _mm_movemask_epi8 ( a) )
199199 }
200200}
201201
@@ -230,7 +230,7 @@ impl Vector for __m256i {
230230 #[ inline]
231231 #[ target_feature( enable = "avx2" ) ]
232232 unsafe fn to_bitmask ( a : Self ) -> u32 {
233- std :: mem :: transmute ( _mm256_movemask_epi8 ( a) )
233+ i32 :: cast_unsigned ( _mm256_movemask_epi8 ( a) )
234234 }
235235}
236236
@@ -587,7 +587,7 @@ mod tests {
587587 }
588588
589589 impl crate :: tests:: TestSearcher for Avx2Searcher < & [ u8 ] > {
590- fn with_position ( needle : & ' static [ u8 ] , position : usize ) -> Avx2Searcher < & [ u8 ] > {
590+ fn with_position ( needle : & ' static [ u8 ] , position : usize ) -> Avx2Searcher < & ' static [ u8 ] > {
591591 unsafe { Avx2Searcher :: with_position ( needle, position) }
592592 }
593593
@@ -596,10 +596,10 @@ mod tests {
596596 }
597597 }
598598
599- crate :: generate_tests!( avx2_searcher, Avx2Searcher ) ;
599+ crate :: tests :: generate_tests!( avx2_searcher, Avx2Searcher ) ;
600600
601601 impl crate :: tests:: TestSearcher for DynamicAvx2Searcher < & [ u8 ] > {
602- fn with_position ( needle : & ' static [ u8 ] , position : usize ) -> DynamicAvx2Searcher < & [ u8 ] > {
602+ fn with_position ( needle : & ' static [ u8 ] , position : usize ) -> DynamicAvx2Searcher < & ' static [ u8 ] > {
603603 unsafe { DynamicAvx2Searcher :: with_position ( needle, position) }
604604 }
605605
@@ -608,5 +608,5 @@ mod tests {
608608 }
609609 }
610610
611- crate :: generate_tests!( dynamic_avx2_searcher, DynamicAvx2Searcher ) ;
611+ crate :: tests :: generate_tests!( dynamic_avx2_searcher, DynamicAvx2Searcher ) ;
612612}
0 commit comments