From 09e55694247f1a9494374e99574cc65bace706e7 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 12 Oct 2021 15:40:49 -0400 Subject: Fix some clippy lints --- src/exhaustive.rs | 2 +- src/kd.rs | 4 ++-- src/util.rs | 1 + 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 ExhaustiveSearch { /// Iterate over the items stored in this index. pub fn iter(&self) -> Iter { - (&self).into_iter() + self.into_iter() } /// Get the size of this index. diff --git a/src/kd.rs b/src/kd.rs index 49b7711..332cabd 100644 --- a/src/kd.rs +++ b/src/kd.rs @@ -186,7 +186,7 @@ impl KdTree { /// Iterate over the items stored in this tree. pub fn iter(&self) -> Iter { - (&self).into_iter() + self.into_iter() } /// Rebalance this k-d tree. @@ -457,7 +457,7 @@ impl FlatKdTree { /// Iterate over the items stored in this tree. pub fn iter(&self) -> FlatIter { - (&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 From for Ordered { } } +#[allow(clippy::derive_ord_xor_partial_ord)] impl Ord for Ordered { fn cmp(&self, other: &Self) -> Ordering { self.partial_cmp(other).expect("Comparison between unordered items") diff --git a/src/vp.rs b/src/vp.rs index 965f484..3e1a8ad 100644 --- a/src/vp.rs +++ b/src/vp.rs @@ -198,7 +198,7 @@ impl VpTree { /// Iterate over the items stored in this tree. pub fn iter(&self) -> Iter { - (&self).into_iter() + self.into_iter() } /// Rebalance this VP tree. @@ -505,7 +505,7 @@ impl FlatVpTree { /// Iterate over the items stored in this tree. pub fn iter(&self) -> FlatIter { - (&self).into_iter() + self.into_iter() } } -- cgit v1.2.3