diff --git a/nalgebra-sparse/src/coo.rs b/nalgebra-sparse/src/coo.rs index 240e2c575..1a1720ede 100644 --- a/nalgebra-sparse/src/coo.rs +++ b/nalgebra-sparse/src/coo.rs @@ -212,7 +212,7 @@ impl CooMatrix { } /// Clear all triplets from the matrix. - pub fn clear_triplets(&mut self, i: usize, j: usize, v: T) + pub fn clear_triplets(&mut self) where T: PartialEq, { diff --git a/nalgebra-sparse/tests/unit_tests/coo.rs b/nalgebra-sparse/tests/unit_tests/coo.rs index 16ee56476..d232b0414 100644 --- a/nalgebra-sparse/tests/unit_tests/coo.rs +++ b/nalgebra-sparse/tests/unit_tests/coo.rs @@ -238,7 +238,7 @@ fn coo_clear_triplets_valid_entries() { vec![(0, 0, &1), (0, 0, &2), (2, 2, &3)] ); coo.clear_triplets(); - assert_eq(coo.triplet_iter.collect::>(), vec![]); + assert_eq!(coo.triplet_iter().collect::>(), vec![]); // making sure everyhting works after clearing coo.push(0, 0, 1); coo.push(0, 0, 2);