diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/exhaustive.rs | 2 | ||||
-rw-r--r-- | src/kd.rs | 4 | ||||
-rw-r--r-- | src/lib.rs | 2 | ||||
-rw-r--r-- | src/vp.rs | 16 |
4 files changed, 13 insertions, 11 deletions
diff --git a/src/exhaustive.rs b/src/exhaustive.rs index 23a490f..3f42876 100644 --- a/src/exhaustive.rs +++ b/src/exhaustive.rs @@ -16,7 +16,7 @@ impl<T> ExhaustiveSearch<T> { } /// Iterate over the items stored in this index. - pub fn iter(&self) -> Iter<T> { + pub fn iter(&self) -> Iter<'_, T> { self.into_iter() } @@ -185,7 +185,7 @@ impl<T: Coordinates> KdTree<T> { } /// Iterate over the items stored in this tree. - pub fn iter(&self) -> Iter<T> { + pub fn iter(&self) -> Iter<'_, T> { self.into_iter() } @@ -456,7 +456,7 @@ impl<T: Coordinates> FlatKdTree<T> { } /// Iterate over the items stored in this tree. - pub fn iter(&self) -> FlatIter<T> { + pub fn iter(&self) -> FlatIter<'_, T> { self.into_iter() } } @@ -122,6 +122,8 @@ //! [`k_nearest_within()`]: knn::NearestNeighbors#method.k_nearest_within //! [`ExactNeighbors`]: knn::ExactNeighbors +#![warn(rust_2018_idioms)] + pub mod chebyshev; pub mod coords; pub mod cos; @@ -197,7 +197,7 @@ impl<T: Proximity> VpTree<T> { } /// Iterate over the items stored in this tree. - pub fn iter(&self) -> Iter<T> { + pub fn iter(&self) -> Iter<'_, T> { self.into_iter() } @@ -246,7 +246,7 @@ where T: Proximity + Debug, DistanceValue<T>: Debug, { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.debug_struct("VpTree") .field("root", &self.root) .finish() @@ -295,7 +295,7 @@ where T: Proximity + Debug, DistanceValue<T>: Debug, { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.debug_struct("IntoIter") .field("stack", &self.stack) .finish() @@ -345,7 +345,7 @@ where T: Proximity + Debug, DistanceValue<T>: Debug, { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.debug_struct("Iter") .field("stack", &self.stack) .finish() @@ -504,7 +504,7 @@ impl<T: Proximity> FlatVpTree<T> { } /// Iterate over the items stored in this tree. - pub fn iter(&self) -> FlatIter<T> { + pub fn iter(&self) -> FlatIter<'_, T> { self.into_iter() } } @@ -514,7 +514,7 @@ where T: Proximity + Debug, DistanceValue<T>: Debug, { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.debug_struct("FlatVpTree") .field("nodes", &self.nodes) .finish() @@ -535,7 +535,7 @@ where T: Proximity + Debug, DistanceValue<T>: Debug, { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.debug_tuple("FlatIntoIter") .field(&self.0) .finish() @@ -567,7 +567,7 @@ where T: Proximity + Debug, DistanceValue<T>: Debug, { - fn fmt(&self, f: &mut Formatter) -> fmt::Result { + fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result { f.debug_tuple("FlatIter") .field(&self.0) .finish() |