Skip to content

Commit

Permalink
Address clippy::needless_lifetimes lint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
lopopolo committed Dec 16, 2024
1 parent 6ff7369 commit a9b95f7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/st/map/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ impl<'a, K, V> Iterator for Iter<'a, K, V> {
}
}

impl<'a, K, V> FusedIterator for Iter<'a, K, V> {}
impl<K, V> FusedIterator for Iter<'_, K, V> {}

impl<'a, K, V> DoubleEndedIterator for Iter<'a, K, V> {
impl<K, V> DoubleEndedIterator for Iter<'_, K, V> {
fn next_back(&mut self) -> Option<Self::Item> {
loop {
match self.0.next_back() {
Expand Down Expand Up @@ -123,9 +123,9 @@ impl<'a, K, V> Iterator for Keys<'a, K, V> {
}
}

impl<'a, K, V> FusedIterator for Keys<'a, K, V> {}
impl<K, V> FusedIterator for Keys<'_, K, V> {}

impl<'a, K, V> DoubleEndedIterator for Keys<'a, K, V> {
impl<K, V> DoubleEndedIterator for Keys<'_, K, V> {
fn next_back(&mut self) -> Option<Self::Item> {
self.0.next_back().map(|(key, _)| key)
}
Expand Down Expand Up @@ -174,9 +174,9 @@ impl<'a, K, V> Iterator for Values<'a, K, V> {
}
}

impl<'a, K, V> FusedIterator for Values<'a, K, V> {}
impl<K, V> FusedIterator for Values<'_, K, V> {}

impl<'a, K, V> DoubleEndedIterator for Values<'a, K, V> {
impl<K, V> DoubleEndedIterator for Values<'_, K, V> {
fn next_back(&mut self) -> Option<Self::Item> {
self.0.next_back().map(|(_, value)| value)
}
Expand Down
6 changes: 3 additions & 3 deletions src/st/set/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ impl<'a, T> Iterator for Iter<'a, T> {
}
}

impl<'a, T> FusedIterator for Iter<'a, T> {}
impl<T> FusedIterator for Iter<'_, T> {}

impl<'a, T> ExactSizeIterator for Iter<'a, T> {}
impl<T> ExactSizeIterator for Iter<'_, T> {}

impl<'a, T> DoubleEndedIterator for Iter<'a, T> {
impl<T> DoubleEndedIterator for Iter<'_, T> {
fn next_back(&mut self) -> Option<Self::Item> {
self.0.next_back()
}
Expand Down

0 comments on commit a9b95f7

Please sign in to comment.