'fix error's

This commit is contained in:
lukas 2022-08-16 20:10:17 -07:00
parent b9483ab545
commit 0eb1f5c125
2 changed files with 2 additions and 2 deletions

View File

@ -212,7 +212,7 @@ impl<T> CooMatrix<T> {
}
/// 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,
{

View File

@ -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<_>>(), vec![]);
assert_eq!(coo.triplet_iter().collect::<Vec<_>>(), vec![]);
// making sure everyhting works after clearing
coo.push(0, 0, 1);
coo.push(0, 0, 2);