diff --git a/src/base/conversion.rs b/src/base/conversion.rs index b852ff59..8ef1a967 100644 --- a/src/base/conversion.rs +++ b/src/base/conversion.rs @@ -245,9 +245,9 @@ macro_rules! impl_from_into_mint_1D( fn from(v: mint::$VT) -> Self { unsafe { let mut res = Self::new_uninitialized(); - ptr::copy_nonoverlapping(&v.x, res.data.ptr_mut(), $SZ); + ptr::copy_nonoverlapping(&v.x, (*res.as_mut_ptr()).data.ptr_mut(), $SZ); - res + res.assume_init() } } } @@ -307,7 +307,7 @@ macro_rules! impl_from_into_mint_2D( fn from(m: mint::$MV) -> Self { unsafe { let mut res = Self::new_uninitialized(); - let mut ptr = (*res).data.ptr_mut(); + let mut ptr = (*res.as_mut_ptr()).data.ptr_mut(); $( ptr::copy_nonoverlapping(&m.$component.x, ptr, $SZRows); ptr = ptr.offset($SZRows); diff --git a/src/base/matrix_alga.rs b/src/base/matrix_alga.rs index c8c08e64..6e97aedb 100644 --- a/src/base/matrix_alga.rs +++ b/src/base/matrix_alga.rs @@ -433,8 +433,8 @@ where "Matrix meet/join error: mismatched dimensions." ); - let mut mres = unsafe { Self::new_uninitialized_generic(shape.0, shape.1) }; - let mut jres = unsafe { Self::new_uninitialized_generic(shape.0, shape.1) }; + let mut mres = unsafe { crate::unimplemented_or_uninitialized_generic!(shape.0, shape.1) }; + let mut jres = unsafe { crate::unimplemented_or_uninitialized_generic!(shape.0, shape.1) }; for i in 0..shape.0.value() * shape.1.value() { unsafe {