Fix clippy warnings

This commit is contained in:
Luis Moreno
2021-10-20 13:50:14 -05:00
parent 1208051fb5
commit 4397c91570
12 changed files with 26 additions and 29 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ impl<T: RealNumber> DenseMatrix<T> {
cur_r: 0,
max_c: self.ncols,
max_r: self.nrows,
m: &self,
m: self,
}
}
}
+3 -3
View File
@@ -178,7 +178,7 @@ impl<T: RealNumber + ScalarOperand> BaseVector<T> for ArrayBase<OwnedRepr<T>, Ix
}
fn copy_from(&mut self, other: &Self) {
self.assign(&other);
self.assign(other);
}
}
@@ -385,7 +385,7 @@ impl<T: RealNumber + ScalarOperand + AddAssign + SubAssign + MulAssign + DivAssi
}
fn copy_from(&mut self, other: &Self) {
self.assign(&other);
self.assign(other);
}
fn abs_mut(&mut self) -> &Self {
@@ -966,7 +966,7 @@ mod tests {
let error: f64 = y
.into_iter()
.zip(y_hat.into_iter())
.map(|(&a, &b)| (a - b).abs())
.map(|(a, b)| (a - b).abs())
.sum();
assert!(error <= 1.0);