Skip to content

Commit d06dc5c

Browse files
committed
Fix bitmasks
1 parent 56b6ee0 commit d06dc5c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/core_simd/src/masks/bitmask.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,17 @@ where
121121

122122
#[inline]
123123
#[must_use = "method returns a new array and does not mutate the original value"]
124-
pub fn to_bitmask_array<const N: usize>(self) -> [u8; N] {
125-
assert!(core::mem::size_of::<Self>() == N);
124+
pub fn to_bitmask_array<const M: usize>(self) -> [u8; M] {
125+
assert!(core::mem::size_of::<Self>() == M);
126126

127127
// Safety: converting an integer to an array of bytes of the same size is safe
128128
unsafe { core::mem::transmute_copy(&self.0) }
129129
}
130130

131131
#[inline]
132132
#[must_use = "method returns a new mask and does not mutate the original value"]
133-
pub fn from_bitmask_array<const N: usize>(bitmask: [u8; N]) -> Self {
134-
assert!(core::mem::size_of::<Self>() == N);
133+
pub fn from_bitmask_array<const M: usize>(bitmask: [u8; M]) -> Self {
134+
assert!(core::mem::size_of::<Self>() == M);
135135

136136
// Safety: converting an array of bytes to an integer of the same size is safe
137137
Self(unsafe { core::mem::transmute_copy(&bitmask) }, PhantomData)

0 commit comments

Comments
 (0)