Skip to content

Commit 6c7ca9e

Browse files
committed
Fix warning: Avoid hiding a lifetime that's elided elsewhere
1 parent 342f3b4 commit 6c7ca9e

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/adaptors/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ where
523523
}
524524

525525
/// Create a new `TakeWhileRef` from a reference to clonable iterator.
526-
pub fn take_while_ref<I, F>(iter: &mut I, f: F) -> TakeWhileRef<I, F>
526+
pub fn take_while_ref<I, F>(iter: &mut I, f: F) -> TakeWhileRef<'_, I, F>
527527
where
528528
I: Iterator + Clone,
529529
{

src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ pub trait Itertools: Iterator {
15181518
///
15191519
/// See also [`.take_while_ref()`](Itertools::take_while_ref)
15201520
/// which is a similar adaptor.
1521-
fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<Self, F>
1521+
fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F>
15221522
where
15231523
Self: Sized + PeekingNext,
15241524
F: FnMut(&Self::Item) -> bool,
@@ -1543,7 +1543,7 @@ pub trait Itertools: Iterator {
15431543
/// assert_eq!(decimals, "0123456789");
15441544
/// assert_eq!(hexadecimals.next(), Some('a'));
15451545
/// ```
1546-
fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<Self, F>
1546+
fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F>
15471547
where
15481548
Self: Clone,
15491549
F: FnMut(&Self::Item) -> bool,
@@ -2506,7 +2506,7 @@ pub trait Itertools: Iterator {
25062506
/// format!("{:.2}", data.iter().format(", ")),
25072507
/// "1.10, 2.72, -3.00");
25082508
/// ```
2509-
fn format(self, sep: &str) -> Format<Self>
2509+
fn format(self, sep: &str) -> Format<'_, Self>
25102510
where
25112511
Self: Sized,
25122512
{
@@ -2545,7 +2545,7 @@ pub trait Itertools: Iterator {
25452545
///
25462546
///
25472547
/// ```
2548-
fn format_with<F>(self, sep: &str, format: F) -> FormatWith<Self, F>
2548+
fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
25492549
where
25502550
Self: Sized,
25512551
F: FnMut(Self::Item, &mut dyn FnMut(&dyn fmt::Display) -> fmt::Result) -> fmt::Result,

src/peeking_take_while.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ where
126126
}
127127

128128
/// Create a `PeekingTakeWhile`
129-
pub fn peeking_take_while<I, F>(iter: &mut I, f: F) -> PeekingTakeWhile<I, F>
129+
pub fn peeking_take_while<I, F>(iter: &mut I, f: F) -> PeekingTakeWhile<'_, I, F>
130130
where
131131
I: Iterator,
132132
{

0 commit comments

Comments
 (0)