diff --git a/src/third_party/glam/common/glam_matrix.rs b/src/third_party/glam/common/glam_matrix.rs index fa9f713f..26f58803 100644 --- a/src/third_party/glam/common/glam_matrix.rs +++ b/src/third_party/glam/common/glam_matrix.rs @@ -14,7 +14,7 @@ macro_rules! impl_vec_conversion( impl From<$Vec2> for Vector2<$N> { #[inline] fn from(e: $Vec2) -> Vector2<$N> { - (*e.as_ref()).into() + <[$N;2]>::from(e).into() } } @@ -31,7 +31,7 @@ macro_rules! impl_vec_conversion( impl From<$Vec3> for Vector3<$N> { #[inline] fn from(e: $Vec3) -> Vector3<$N> { - (*e.as_ref()).into() + <[$N;3]>::from(e).into() } } @@ -48,7 +48,7 @@ macro_rules! impl_vec_conversion( impl From<$Vec4> for Vector4<$N> { #[inline] fn from(e: $Vec4) -> Vector4<$N> { - (*e.as_ref()).into() + <[$N;4]>::from(e).into() } } diff --git a/src/third_party/glam/common/glam_point.rs b/src/third_party/glam/common/glam_point.rs index b15a6c6d..205986b8 100644 --- a/src/third_party/glam/common/glam_point.rs +++ b/src/third_party/glam/common/glam_point.rs @@ -9,7 +9,7 @@ macro_rules! impl_point_conversion( impl From<$Vec2> for Point2<$N> { #[inline] fn from(e: $Vec2) -> Point2<$N> { - (*e.as_ref()).into() + <[$N;2]>::from(e).into() } } @@ -23,7 +23,7 @@ macro_rules! impl_point_conversion( impl From<$Vec3> for Point3<$N> { #[inline] fn from(e: $Vec3) -> Point3<$N> { - (*e.as_ref()).into() + <[$N;3]>::from(e).into() } } @@ -37,7 +37,7 @@ macro_rules! impl_point_conversion( impl From<$Vec4> for Point4<$N> { #[inline] fn from(e: $Vec4) -> Point4<$N> { - (*e.as_ref()).into() + <[$N;4]>::from(e).into() } }