Skip to content

Commit

Permalink
Merge pull request #173 from artichoke/lopopolo/clippy-unit-pattern
Browse files Browse the repository at this point in the history
Fixup `clippy::ignored_unit_patterns` lint violations
  • Loading branch information
lopopolo authored Nov 15, 2023
2 parents f07a556 + b20c132 commit 68c7f27
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/st/set/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl<T> Iterator for IntoIter<T> {

#[inline]
fn next(&mut self) -> Option<Self::Item> {
self.0.next().map(|(elem, _)| elem)
self.0.next().map(|(elem, ())| elem)
}

#[inline]
Expand All @@ -82,17 +82,17 @@ impl<T> Iterator for IntoIter<T> {

#[inline]
fn last(self) -> Option<Self::Item> {
self.0.last().map(|(elem, _)| elem)
self.0.last().map(|(elem, ())| elem)
}

#[inline]
fn nth(&mut self, n: usize) -> Option<Self::Item> {
self.0.nth(n).map(|(elem, _)| elem)
self.0.nth(n).map(|(elem, ())| elem)
}

#[inline]
fn collect<B: FromIterator<Self::Item>>(self) -> B {
self.0.map(|(elem, _)| elem).collect()
self.0.map(|(elem, ())| elem).collect()
}
}

Expand All @@ -102,11 +102,11 @@ impl<T> ExactSizeIterator for IntoIter<T> {}

impl<T> DoubleEndedIterator for IntoIter<T> {
fn next_back(&mut self) -> Option<Self::Item> {
self.0.next_back().map(|(elem, _)| elem)
self.0.next_back().map(|(elem, ())| elem)
}

fn nth_back(&mut self, n: usize) -> Option<Self::Item> {
self.0.nth_back(n).map(|(elem, _)| elem)
self.0.nth_back(n).map(|(elem, ())| elem)
}
}

Expand Down

0 comments on commit 68c7f27

Please sign in to comment.