diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2021-10-21 14:00:45 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2021-10-21 14:00:45 -0400 |
commit | bf2a10ca3b54ac3ed3dcc9c25cb1cf7f07ba8135 (patch) | |
tree | 632db87bfa81c29575dfdb7834b44c0226a34248 /src/vp.rs | |
parent | 09e55694247f1a9494374e99574cc65bace706e7 (diff) | |
download | acap-bf2a10ca3b54ac3ed3dcc9c25cb1cf7f07ba8135.tar.xz |
Add explicit '_ lifetimes to generic types
Diffstat (limited to 'src/vp.rs')
-rw-r--r-- | src/vp.rs | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -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() |