diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-10-12 15:40:49 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-10-12 15:40:49 -0400 |
commit | 09e55694247f1a9494374e99574cc65bace706e7 (patch) | |
tree | f60ddf5716a04721934fcc841789920116c90b8d | |
parent | 845dc470e959893422b6117f934e3c9cae3f4bd6 (diff) | |
download | acap-09e55694247f1a9494374e99574cc65bace706e7.tar.xz |
Fix some clippy lints
-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() } } |