From a72e52b4e93f9ec6f7826f48c06f0e808e8df44c Mon Sep 17 00:00:00 2001 From: ltdk Date: Fri, 4 Oct 2024 23:15:02 -0400 Subject: [PATCH] Autofix clippy::needless_lifetimes lint --- src/map.rs | 14 +++++++------- src/set.rs | 2 +- src/table.rs | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/map.rs b/src/map.rs index 03a9f194e..1969bff54 100644 --- a/src/map.rs +++ b/src/map.rs @@ -3042,7 +3042,7 @@ impl Debug for OccupiedError<'_, K, V, S, A } } -impl<'a, K: Debug, V: Debug, S, A: Allocator> fmt::Display for OccupiedError<'a, K, V, S, A> { +impl fmt::Display for OccupiedError<'_, K, V, S, A> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!( f, @@ -3153,7 +3153,7 @@ impl IntoIterator for HashMap { } } -impl<'a, K, V> Default for Iter<'a, K, V> { +impl Default for Iter<'_, K, V> { #[cfg_attr(feature = "inline-more", inline)] fn default() -> Self { Self { @@ -3201,7 +3201,7 @@ impl ExactSizeIterator for Iter<'_, K, V> { impl FusedIterator for Iter<'_, K, V> {} -impl<'a, K, V> Default for IterMut<'a, K, V> { +impl Default for IterMut<'_, K, V> { #[cfg_attr(feature = "inline-more", inline)] fn default() -> Self { Self { @@ -3300,7 +3300,7 @@ impl fmt::Debug for IntoIter { } } -impl<'a, K, V> Default for Keys<'a, K, V> { +impl Default for Keys<'_, K, V> { #[cfg_attr(feature = "inline-more", inline)] fn default() -> Self { Self { @@ -3340,7 +3340,7 @@ impl ExactSizeIterator for Keys<'_, K, V> { } impl FusedIterator for Keys<'_, K, V> {} -impl<'a, K, V> Default for Values<'a, K, V> { +impl Default for Values<'_, K, V> { #[cfg_attr(feature = "inline-more", inline)] fn default() -> Self { Self { @@ -3380,7 +3380,7 @@ impl ExactSizeIterator for Values<'_, K, V> { } impl FusedIterator for Values<'_, K, V> {} -impl<'a, K, V> Default for ValuesMut<'a, K, V> { +impl Default for ValuesMut<'_, K, V> { #[cfg_attr(feature = "inline-more", inline)] fn default() -> Self { Self { @@ -3428,7 +3428,7 @@ impl fmt::Debug for ValuesMut<'_, K, V> { } } -impl<'a, K, V, A: Allocator> Iterator for Drain<'a, K, V, A> { +impl Iterator for Drain<'_, K, V, A> { type Item = (K, V); #[cfg_attr(feature = "inline-more", inline)] diff --git a/src/set.rs b/src/set.rs index 442e1cf6c..819d01c66 100644 --- a/src/set.rs +++ b/src/set.rs @@ -1812,7 +1812,7 @@ impl<'a, K> Iterator for Iter<'a, K> { self.iter.fold(init, f) } } -impl<'a, K> ExactSizeIterator for Iter<'a, K> { +impl ExactSizeIterator for Iter<'_, K> { #[cfg_attr(feature = "inline-more", inline)] fn len(&self) -> usize { self.iter.len() diff --git a/src/table.rs b/src/table.rs index d442a0149..7f665b75a 100644 --- a/src/table.rs +++ b/src/table.rs @@ -1958,7 +1958,7 @@ pub struct Iter<'a, T> { marker: PhantomData<&'a T>, } -impl<'a, T> Default for Iter<'a, T> { +impl Default for Iter<'_, T> { #[cfg_attr(feature = "inline-more", inline)] fn default() -> Self { Iter { @@ -2031,7 +2031,7 @@ pub struct IterMut<'a, T> { marker: PhantomData<&'a mut T>, } -impl<'a, T> Default for IterMut<'a, T> { +impl Default for IterMut<'_, T> { #[cfg_attr(feature = "inline-more", inline)] fn default() -> Self { IterMut { @@ -2100,7 +2100,7 @@ pub struct IterHash<'a, T> { marker: PhantomData<&'a T>, } -impl<'a, T> Default for IterHash<'a, T> { +impl Default for IterHash<'_, T> { #[cfg_attr(feature = "inline-more", inline)] fn default() -> Self { IterHash { @@ -2166,7 +2166,7 @@ pub struct IterHashMut<'a, T> { marker: PhantomData<&'a mut T>, } -impl<'a, T> Default for IterHashMut<'a, T> { +impl Default for IterHashMut<'_, T> { #[cfg_attr(feature = "inline-more", inline)] fn default() -> Self { IterHashMut {