From 4eaf8794f6cf1dfbbc6b2d490dad74780c4bb57e Mon Sep 17 00:00:00 2001 From: Quaternions Date: Tue, 10 Sep 2024 11:32:42 -0700 Subject: [PATCH] fix compile without named fields --- fixed_wide_vectors/src/matrix.rs | 1 + fixed_wide_vectors/src/tests/fixed_wide.rs | 2 ++ fixed_wide_vectors/src/vector.rs | 1 + 3 files changed, 4 insertions(+) diff --git a/fixed_wide_vectors/src/matrix.rs b/fixed_wide_vectors/src/matrix.rs index 5a6b914..be59900 100644 --- a/fixed_wide_vectors/src/matrix.rs +++ b/fixed_wide_vectors/src/matrix.rs @@ -13,4 +13,5 @@ crate::impl_matrix_extend!(3,2); crate::impl_matrix_extend!(3,3); //Special case 3x3 matrix operations because I cba to write macros for the arbitrary cases +#[cfg(feature="named-fields")] crate::impl_matrix_3x3!(); diff --git a/fixed_wide_vectors/src/tests/fixed_wide.rs b/fixed_wide_vectors/src/tests/fixed_wide.rs index 9b363bb..f0ee366 100644 --- a/fixed_wide_vectors/src/tests/fixed_wide.rs +++ b/fixed_wide_vectors/src/tests/fixed_wide.rs @@ -63,6 +63,7 @@ fn wide_matrix_dot(){ } #[test] +#[cfg(feature="named-fields")] fn wide_matrix_det(){ let m=Matrix3::new([ [Planar64::from(1),Planar64::from(2),Planar64::from(3)], @@ -75,6 +76,7 @@ fn wide_matrix_det(){ } #[test] +#[cfg(feature="named-fields")] fn wide_matrix_adjugate(){ let m=Matrix3::new([ [Planar64::from(1),Planar64::from(2),Planar64::from(3)], diff --git a/fixed_wide_vectors/src/vector.rs b/fixed_wide_vectors/src/vector.rs index 3b7a15d..b5a41e5 100644 --- a/fixed_wide_vectors/src/vector.rs +++ b/fixed_wide_vectors/src/vector.rs @@ -15,4 +15,5 @@ crate::impl_vector_extend!(2); crate::impl_vector_extend!(3); //cross product +#[cfg(feature="named-fields")] crate::impl_vector_3!();