diff options
author | HampusM <hampus@hampusmat.com> | 2024-06-20 19:44:24 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-06-20 19:44:24 +0200 |
commit | e945f53395be9e0cd1e3a6894bc5e7fa08330298 (patch) | |
tree | b0ef1ac51927c2799203e5dd02f52e1ab76954d4 /engine/src/data_types | |
parent | cdc51e0c4369d1ef38ff8d6cc9440b91b2c90535 (diff) |
refactor(engine): remove matrix new function Copy bound
Diffstat (limited to 'engine/src/data_types')
-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 { |