summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/exhaustive.rs2
-rw-r--r--src/kd.rs4
-rw-r--r--src/util.rs1
-rw-r--r--src/vp.rs4
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.
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<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")
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<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()
}
}