chore: update clippy lints (#272)
* chore: fix clippy lints --------- Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
This commit is contained in:
@@ -188,8 +188,7 @@ pub trait ArrayView1<T: Debug + Display + Copy + Sized>: Array<T, usize> {
|
||||
_ => max,
|
||||
}
|
||||
};
|
||||
self.iterator(0)
|
||||
.fold(T::min_value(), |max, x| max_f(max, x))
|
||||
self.iterator(0).fold(T::min_value(), max_f)
|
||||
}
|
||||
/// return min value from the view
|
||||
fn min(&self) -> T
|
||||
@@ -202,8 +201,7 @@ pub trait ArrayView1<T: Debug + Display + Copy + Sized>: Array<T, usize> {
|
||||
_ => min,
|
||||
}
|
||||
};
|
||||
self.iterator(0)
|
||||
.fold(T::max_value(), |max, x| min_f(max, x))
|
||||
self.iterator(0).fold(T::max_value(), min_f)
|
||||
}
|
||||
/// return the position of the max value of the view
|
||||
fn argmax(&self) -> usize
|
||||
|
||||
@@ -650,7 +650,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_from_iterator() {
|
||||
let data = vec![1, 2, 3, 4, 5, 6];
|
||||
let data = [1, 2, 3, 4, 5, 6];
|
||||
|
||||
let m = DenseMatrix::from_iterator(data.iter(), 2, 3, 0);
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn test_len() {
|
||||
let x = vec![1, 2, 3];
|
||||
let x = [1, 2, 3];
|
||||
assert_eq!(3, x.len());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user