From db3d08f81a30a814891d6e961ce3067a4150510c Mon Sep 17 00:00:00 2001 From: est31 Date: Tue, 12 Mar 2019 09:00:23 +0100 Subject: [PATCH] Fix two compiler warnings Fixes #561 --- src/base/cg.rs | 3 ++- src/base/edition.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) 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 {