diff --git a/src/base/cg.rs b/src/base/cg.rs index 5883e710..2787e80b 100644 --- a/src/base/cg.rs +++ b/src/base/cg.rs @@ -294,7 +294,8 @@ impl> SquareMatrix { for i in 0..D::dim() { for j in 0..D::dim() - 1 { - self[(j, i)] += shift[j] * self[(D::dim() - 1, i)]; + let add = shift[j] * self[(D::dim() - 1, i)]; + self[(j, i)] += add; } } } diff --git a/src/base/edition.rs b/src/base/edition.rs index 32e2c1aa..d7aba78f 100644 --- a/src/base/edition.rs +++ b/src/base/edition.rs @@ -58,7 +58,7 @@ impl> Matrix { for j in 0..ncols.value() { // FIXME: use unchecked column indexing let mut res = res.column_mut(j); - let mut src = self.column(j); + let src = self.column(j); for (destination, source) in irows.clone().enumerate() { unsafe {