use casts instead of transmute in mino::Mat::new()
This commit is contained in:
parent
5e069cf3ff
commit
60cde45eea
|
@ -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(&[]);
|
||||
|
|
Loading…
Reference in New Issue