Skip to content

Commit

Permalink
Bump peekable_next_if to rust 1.51.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Feb 5, 2021
1 parent 34cb4bc commit ceda547
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/core/src/iter/adapters/peekable.rs
Expand Up @@ -282,7 +282,7 @@ impl<I: Iterator> Peekable<I> {
/// // The next value returned will be 10
/// assert_eq!(iter.next(), Some(10));
/// ```
#[stable(feature = "peekable_next_if", since = "1.50.0")]
#[stable(feature = "peekable_next_if", since = "1.51.0")]
pub fn next_if(&mut self, func: impl FnOnce(&I::Item) -> bool) -> Option<I::Item> {
match self.next() {
Some(matched) if func(&matched) => Some(matched),
Expand All @@ -308,7 +308,7 @@ impl<I: Iterator> Peekable<I> {
/// // `next_if_eq` saves the value of the next item if it was not equal to `expected`.
/// assert_eq!(iter.next(), Some(1));
/// ```
#[stable(feature = "peekable_next_if", since = "1.50.0")]
#[stable(feature = "peekable_next_if", since = "1.51.0")]
pub fn next_if_eq<T>(&mut self, expected: &T) -> Option<I::Item>
where
T: ?Sized,
Expand Down

0 comments on commit ceda547

Please sign in to comment.