diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/exhaustive.rs | 2 | ||||
-rw-r--r-- | src/kd.rs | 4 | ||||
-rw-r--r-- | src/util.rs | 1 | ||||
-rw-r--r-- | src/vp.rs | 4 |
4 files changed, 6 insertions, 5 deletions
diff --git a/src/exhaustive.rs b/src/exhaustive.rs index 626c6f4..23a490f 100644 --- a/src/exhaustive.rs +++ b/src/exhaustive.rs @@ -17,7 +17,7 @@ impl<T> ExhaustiveSearch<T> { /// Iterate over the items stored in this index. pub fn iter(&self) -> Iter<T> { - (&self).into_iter() + self.into_iter() } /// Get the size of this index. @@ -186,7 +186,7 @@ impl<T: Coordinates> KdTree<T> { /// Iterate over the items stored in this tree. pub fn iter(&self) -> Iter<T> { - (&self).into_iter() + self.into_iter() } /// Rebalance this k-d tree. @@ -457,7 +457,7 @@ impl<T: Coordinates> FlatKdTree<T> { /// Iterate over the items stored in this tree. pub fn iter(&self) -> FlatIter<T> { - (&self).into_iter() + self.into_iter() } } diff --git a/src/util.rs b/src/util.rs index 0979782..6a969de 100644 --- a/src/util.rs +++ b/src/util.rs @@ -19,6 +19,7 @@ impl<T> From<T> for Ordered<T> { } } +#[allow(clippy::derive_ord_xor_partial_ord)] impl<T: PartialOrd> Ord for Ordered<T> { fn cmp(&self, other: &Self) -> Ordering { self.partial_cmp(other).expect("Comparison between unordered items") @@ -198,7 +198,7 @@ impl<T: Proximity> VpTree<T> { /// Iterate over the items stored in this tree. pub fn iter(&self) -> Iter<T> { - (&self).into_iter() + self.into_iter() } /// Rebalance this VP tree. @@ -505,7 +505,7 @@ impl<T: Proximity> FlatVpTree<T> { /// Iterate over the items stored in this tree. pub fn iter(&self) -> FlatIter<T> { - (&self).into_iter() + self.into_iter() } } |