@@ -33,7 +33,7 @@ mod sealed {
33
33
34
34
fn eq ( self , other : Self ) -> bool ;
35
35
36
- fn as_usize ( self ) -> usize ;
36
+ fn to_usize ( self ) -> usize ;
37
37
38
38
type Unsigned : SimdElement ;
39
39
@@ -65,7 +65,7 @@ macro_rules! impl_element {
65
65
fn eq( self , other: Self ) -> bool { self == other }
66
66
67
67
#[ inline]
68
- fn as_usize ( self ) -> usize {
68
+ fn to_usize ( self ) -> usize {
69
69
self as usize
70
70
}
71
71
@@ -174,10 +174,7 @@ where
174
174
#[ must_use = "method returns a new mask and does not mutate the original value" ]
175
175
pub unsafe fn from_int_unchecked ( value : Simd < T , N > ) -> Self {
176
176
// Safety: the caller must confirm this invariant
177
- unsafe {
178
- core:: intrinsics:: assume ( <T as Sealed >:: valid ( value) ) ;
179
- Self ( mask_impl:: Mask :: from_int_unchecked ( value) )
180
- }
177
+ unsafe { Self ( mask_impl:: Mask :: from_int_unchecked ( value) ) }
181
178
}
182
179
183
180
/// Converts a vector of integers to a mask, where 0 represents `false` and -1
@@ -394,7 +391,7 @@ where
394
391
if min_index. eq ( T :: TRUE ) {
395
392
None
396
393
} else {
397
- Some ( min_index. as_usize ( ) )
394
+ Some ( min_index. to_usize ( ) )
398
395
}
399
396
}
400
397
}
0 commit comments