Rename Mask::from_int to Mask::from_simd
This commit is contained in:
parent
1e62d4c87c
commit
42409f05bf
2 changed files with 2 additions and 2 deletions
|
|
@ -204,7 +204,7 @@ where
|
|||
#[inline]
|
||||
#[must_use = "method returns a new mask and does not mutate the original value"]
|
||||
#[track_caller]
|
||||
pub fn from_int(value: Simd<T, N>) -> Self {
|
||||
pub fn from_simd(value: Simd<T, N>) -> Self {
|
||||
assert!(T::valid(value), "all values must be either 0 or -1",);
|
||||
// Safety: the validity has been checked
|
||||
unsafe { Self::from_int_unchecked(value) }
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ macro_rules! test_mask_api {
|
|||
let mask = Mask::<$type, 8>::from_array(values);
|
||||
let int = mask.to_simd();
|
||||
assert_eq!(int.to_array(), [-1, 0, 0, -1, 0, 0, -1, 0]);
|
||||
assert_eq!(Mask::<$type, 8>::from_int(int), mask);
|
||||
assert_eq!(Mask::<$type, 8>::from_simd(int), mask);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue