diff --git a/mino/src/matrix.rs b/mino/src/matrix.rs index 7904c28..bdb29c9 100644 --- a/mino/src/matrix.rs +++ b/mino/src/matrix.rs @@ -34,7 +34,7 @@ impl Mat { if data.len() >= i16::MAX as usize { panic!("matrix height overflows i16"); } - unsafe { core::mem::transmute(data) } + unsafe { &*(data as *const [u16] as *const Self) } } pub const EMPTY: &'static Self = Self::new(&[]);