fix needless-range and clippy::ptr_arg warnings. (#36)

* Fix needless for loop range

* Do not ignore clippy::ptr_arg
This commit is contained in:
morenol
2020-12-11 16:52:39 -04:00
committed by GitHub
parent 2650416235
commit 53351b2ece
27 changed files with 208 additions and 219 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ pub struct Euclidian {}
impl Euclidian {
#[inline]
pub(crate) fn squared_distance<T: RealNumber>(x: &Vec<T>, y: &Vec<T>) -> T {
pub(crate) fn squared_distance<T: RealNumber>(x: &[T], y: &[T]) -> T {
if x.len() != y.len() {
panic!("Input vector sizes are different.");
}