Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Hoffmann <[email protected]>
  • Loading branch information
antiguru committed Feb 22, 2024
1 parent 0abb0b4 commit b91ac77
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 11 deletions.
3 changes: 1 addition & 2 deletions src/impls/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,7 @@ where
Self: 'a,
I: Iterator<Item = &'a Self> + Clone,
{
self.inner
.reserve_regions(regions.clone().map(|r| &r.inner));
self.inner.reserve_regions(regions.map(|r| &r.inner));
}

fn clear(&mut self) {
Expand Down
2 changes: 1 addition & 1 deletion src/impls/deduplicate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl<R: Region<Index = (usize, usize)>, O: OffsetContainer<usize>> Region
let mut offsets = O::default();
offsets.push(0);
Self {
inner: R::merge_regions(regions.clone().map(|r| &r.inner)),
inner: R::merge_regions(regions.map(|r| &r.inner)),
offsets,
last_index: 0,
}
Expand Down
5 changes: 2 additions & 3 deletions src/impls/option.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ impl<R: Region> Region for OptionRegion<R> {
Self: 'a,
I: Iterator<Item = &'a Self> + Clone,
{
self.inner
.reserve_regions(regions.clone().map(|r| &r.inner));
self.inner.reserve_regions(regions.map(|r| &r.inner));
}

#[inline]
Expand Down Expand Up @@ -100,6 +99,6 @@ where
where
I: Iterator<Item = Self> + Clone,
{
ReserveItems::reserve_items(&mut target.inner, items.clone().flat_map(|r| r.as_ref()));
ReserveItems::reserve_items(&mut target.inner, items.flat_map(|r| r.as_ref()));
}
}
7 changes: 2 additions & 5 deletions src/impls/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ where
I: Iterator<Item = &'a Self> + Clone,
{
self.oks.reserve_regions(regions.clone().map(|r| &r.oks));
self.errs.reserve_regions(regions.clone().map(|r| &r.errs));
self.errs.reserve_regions(regions.map(|r| &r.errs));
}

#[inline]
Expand Down Expand Up @@ -130,9 +130,6 @@ where
I: Iterator<Item = Self> + Clone,
{
ReserveItems::reserve_items(&mut target.oks, items.clone().flat_map(|r| r.as_ref().ok()));
ReserveItems::reserve_items(
&mut target.errs,
items.clone().flat_map(|r| r.as_ref().err()),
);
ReserveItems::reserve_items(&mut target.errs, items.flat_map(|r| r.as_ref().err()));
}
}

0 comments on commit b91ac77

Please sign in to comment.