Skip to content

Commit

Permalink
Fix nightly clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
grelner committed Oct 9, 2024
1 parent 522e945 commit 3c86fd9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions roaring/src/bitmap/container.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ impl IntoIterator for Container {
}
}

impl<'a> Iterator for Iter<'a> {
impl Iterator for Iter<'_> {
type Item = u32;
fn next(&mut self) -> Option<u32> {
self.inner.next().map(|i| util::join(self.key, i))
Expand All @@ -318,7 +318,7 @@ impl fmt::Debug for Container {
}
}

impl<'a> Iter<'a> {
impl Iter<'_> {
pub fn empty() -> Self {
Self { key: 0, inner: store::Iter::empty() }
}
Expand Down
6 changes: 3 additions & 3 deletions roaring/src/bitmap/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ impl<'a> Iter<'a> {
self.advance_to_inner(n);
}
}
impl<'a> Iterator for Iter<'a> {
impl Iterator for Iter<'_> {
type Item = u32;
fn next(&mut self) -> Option<u32> {
self.next_inner()
Expand All @@ -70,7 +70,7 @@ impl<'a> Iterator for Iter<'a> {
self.fold_inner(init, f)
}
}
impl<'a> DoubleEndedIterator for Iter<'a> {
impl DoubleEndedIterator for Iter<'_> {
fn next_back(&mut self) -> Option<Self::Item> {
self.next_back_inner()
}
Expand All @@ -84,7 +84,7 @@ impl<'a> DoubleEndedIterator for Iter<'a> {
}
}
#[cfg(target_pointer_width = "64")]
impl<'a> ExactSizeIterator for Iter<'a> {
impl ExactSizeIterator for Iter<'_> {
fn len(&self) -> usize {
self.size_hint as usize
}
Expand Down
2 changes: 1 addition & 1 deletion roaring/src/bitmap/store/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ impl Iter<'_> {
Self { inner: IterInner::Array([].iter()), size_hint: 0 }
}
}
impl<'a> Iterator for Iter<'a> {
impl Iterator for Iter<'_> {
type Item = u16;

fn next(&mut self) -> Option<u16> {
Expand Down
6 changes: 3 additions & 3 deletions roaring/src/treemap/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct To64Iter<'a> {
inner: Iter32<'a>,
}

impl<'a> Iterator for To64Iter<'a> {
impl Iterator for To64Iter<'_> {
type Item = u64;
fn next(&mut self) -> Option<u64> {
self.inner.next().map(|n| util::join(self.hi, n))
Expand Down Expand Up @@ -109,7 +109,7 @@ pub struct IntoIter {
size_hint: u64,
}

impl<'a> Iter<'a> {
impl Iter<'_> {
fn new(map: &BTreeMap<u32, RoaringBitmap>) -> Iter {
let size_hint: u64 = map.iter().map(|(_, r)| r.len()).sum();
let i = map.iter().flat_map(to64iter as _);
Expand All @@ -125,7 +125,7 @@ impl IntoIter {
}
}

impl<'a> Iterator for Iter<'a> {
impl Iterator for Iter<'_> {
type Item = u64;

fn next(&mut self) -> Option<u64> {
Expand Down

0 comments on commit 3c86fd9

Please sign in to comment.