Skip to content

Commit ff0c942

Browse files
committed
fix clippy lints
1 parent f80883b commit ff0c942

File tree

6 files changed

+16
-17
lines changed

6 files changed

+16
-17
lines changed

src/adaptors/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ pub struct TakeWhileRef<'a, I: 'a, F> {
515515
f: F,
516516
}
517517

518-
impl<'a, I, F> fmt::Debug for TakeWhileRef<'a, I, F>
518+
impl<I, F> fmt::Debug for TakeWhileRef<'_, I, F>
519519
where
520520
I: Iterator + fmt::Debug,
521521
{
@@ -530,7 +530,7 @@ where
530530
TakeWhileRef { iter, f }
531531
}
532532

533-
impl<'a, I, F> Iterator for TakeWhileRef<'a, I, F>
533+
impl<I, F> Iterator for TakeWhileRef<'_, I, F>
534534
where
535535
I: Iterator + Clone,
536536
F: FnMut(&I::Item) -> bool,

src/format.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ where
4747
}
4848
}
4949

50-
impl<'a, I, F> fmt::Display for FormatWith<'a, I, F>
50+
impl<I, F> fmt::Display for FormatWith<'_, I, F>
5151
where
5252
I: Iterator,
5353
F: FnMut(I::Item, &mut dyn FnMut(&dyn fmt::Display) -> fmt::Result) -> fmt::Result,
@@ -71,7 +71,7 @@ where
7171
}
7272
}
7373

74-
impl<'a, I, F> fmt::Debug for FormatWith<'a, I, F>
74+
impl<I, F> fmt::Debug for FormatWith<'_, I, F>
7575
where
7676
I: Iterator,
7777
F: FnMut(I::Item, &mut dyn FnMut(&dyn fmt::Display) -> fmt::Result) -> fmt::Result,
@@ -81,7 +81,7 @@ where
8181
}
8282
}
8383

84-
impl<'a, I> Format<'a, I>
84+
impl<I> Format<'_, I>
8585
where
8686
I: Iterator,
8787
{
@@ -125,7 +125,7 @@ macro_rules! impl_format {
125125

126126
impl_format! {Display Debug UpperExp LowerExp UpperHex LowerHex Octal Binary Pointer}
127127

128-
impl<'a, I, F> Clone for FormatWith<'a, I, F>
128+
impl<I, F> Clone for FormatWith<'_, I, F>
129129
where
130130
(I, F): Clone,
131131
{
@@ -135,7 +135,7 @@ where
135135
inner: Option<(I, F)>,
136136
}
137137
// This ensures we preserve the state of the original `FormatWith` if `Clone` panics
138-
impl<'r, 'a, I, F> Drop for PutBackOnDrop<'r, 'a, I, F> {
138+
impl<I, F> Drop for PutBackOnDrop<'_, '_, I, F> {
139139
fn drop(&mut self) {
140140
self.into.inner.set(self.inner.take())
141141
}
@@ -151,7 +151,7 @@ where
151151
}
152152
}
153153

154-
impl<'a, I> Clone for Format<'a, I>
154+
impl<I> Clone for Format<'_, I>
155155
where
156156
I: Clone,
157157
{
@@ -161,7 +161,7 @@ where
161161
inner: Option<I>,
162162
}
163163
// This ensures we preserve the state of the original `FormatWith` if `Clone` panics
164-
impl<'r, 'a, I> Drop for PutBackOnDrop<'r, 'a, I> {
164+
impl<I> Drop for PutBackOnDrop<'_, '_, I> {
165165
fn drop(&mut self) {
166166
self.into.inner.set(self.inner.take())
167167
}

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,6 @@ pub trait Itertools: Iterator {
10551055
/// let it = a.merge_by(b, |x, y| x.1 <= y.1);
10561056
/// itertools::assert_equal(it, vec![(0, 'a'), (0, 'b'), (1, 'c'), (1, 'd')]);
10571057
/// ```
1058-
10591058
fn merge_by<J, F>(self, other: J, is_first: F) -> MergeBy<Self, J::IntoIter, F>
10601059
where
10611060
Self: Sized,

src/peeking_take_while.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub trait PeekingNext: Iterator {
2222
F: FnOnce(&Self::Item) -> bool;
2323
}
2424

25-
impl<'a, I> PeekingNext for &'a mut I
25+
impl<I> PeekingNext for &mut I
2626
where
2727
I: PeekingNext,
2828
{
@@ -133,7 +133,7 @@ where
133133
PeekingTakeWhile { iter, f }
134134
}
135135

136-
impl<'a, I, F> Iterator for PeekingTakeWhile<'a, I, F>
136+
impl<I, F> Iterator for PeekingTakeWhile<'_, I, F>
137137
where
138138
I: PeekingNext,
139139
F: FnMut(&I::Item) -> bool,
@@ -148,7 +148,7 @@ where
148148
}
149149
}
150150

151-
impl<'a, I, F> PeekingNext for PeekingTakeWhile<'a, I, F>
151+
impl<I, F> PeekingNext for PeekingTakeWhile<'_, I, F>
152152
where
153153
I: PeekingNext,
154154
F: FnMut(&I::Item) -> bool,

src/process_results_impl.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct ProcessResults<'a, I, E: 'a> {
1313
iter: I,
1414
}
1515

16-
impl<'a, I, E> ProcessResults<'a, I, E> {
16+
impl<I, E> ProcessResults<'_, I, E> {
1717
#[inline(always)]
1818
fn next_body<T>(&mut self, item: Option<Result<T, E>>) -> Option<T> {
1919
match item {
@@ -27,7 +27,7 @@ impl<'a, I, E> ProcessResults<'a, I, E> {
2727
}
2828
}
2929

30-
impl<'a, I, T, E> Iterator for ProcessResults<'a, I, E>
30+
impl<I, T, E> Iterator for ProcessResults<'_, I, E>
3131
where
3232
I: Iterator<Item = Result<T, E>>,
3333
{
@@ -60,7 +60,7 @@ where
6060
}
6161
}
6262

63-
impl<'a, I, T, E> DoubleEndedIterator for ProcessResults<'a, I, E>
63+
impl<I, T, E> DoubleEndedIterator for ProcessResults<'_, I, E>
6464
where
6565
I: Iterator<Item = Result<T, E>>,
6666
I: DoubleEndedIterator,

src/rciter_impl.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ where
8787
}
8888

8989
/// Return an iterator from `&RcIter<I>` (by simply cloning it).
90-
impl<'a, I> IntoIterator for &'a RcIter<I>
90+
impl<I> IntoIterator for &RcIter<I>
9191
where
9292
I: Iterator,
9393
{

0 commit comments

Comments
 (0)