chore: update clippy lints (#272)

* chore: fix clippy lints
---------

Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
This commit is contained in:
morenol
2023-11-20 21:54:09 -04:00
committed by GitHub
parent dbdc2b2a77
commit 6f22bbd150
13 changed files with 19 additions and 28 deletions
+1 -1
View File
@@ -160,7 +160,7 @@ mod tests {
fn bg_solver() {
let a = DenseMatrix::from_2d_array(&[&[25., 15., -5.], &[15., 18., 0.], &[-5., 0., 11.]]);
let b = vec![40., 51., 28.];
let expected = vec![1.0, 2.0, 3.0];
let expected = [1.0, 2.0, 3.0];
let mut x = Vec::zeros(3);
+1 -5
View File
@@ -890,11 +890,7 @@ mod tests {
let y_hat = lr.predict(&x).unwrap();
let error: i32 = y
.into_iter()
.zip(y_hat.into_iter())
.map(|(a, b)| (a - b).abs())
.sum();
let error: i32 = y.into_iter().zip(y_hat).map(|(a, b)| (a - b).abs()).sum();
assert!(error <= 1);