diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/src/data_types/matrix.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engine/src/data_types/matrix.rs b/engine/src/data_types/matrix.rs index c5cc63a..3a29ae2 100644 --- a/engine/src/data_types/matrix.rs +++ b/engine/src/data_types/matrix.rs @@ -13,10 +13,10 @@ impl<Value, const ROWS: usize, const COLUMNS: usize> Matrix<Value, ROWS, COLUMNS #[must_use] pub fn new() -> Self where - Value: Default + Copy, + Value: Default, { Self { - items: [[Value::default(); ROWS]; COLUMNS], + items: std::array::from_fn(|_| std::array::from_fn(|_| Value::default())), } } @@ -37,7 +37,7 @@ impl<Value, const ROWS: usize, const COLUMNS: usize> Matrix<Value, ROWS, COLUMNS impl<Value, const ROWS: usize, const COLUMNS: usize> Default for Matrix<Value, ROWS, COLUMNS> where - Value: Copy + Default, + Value: Default, { fn default() -> Self { |