Skip to content

std: Clean out deprecated APIs #34705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions src/libcore/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1244,39 +1244,6 @@ impl<I: Iterator> Peekable<I> {
None => None,
}
}

/// Checks if the iterator has finished iterating.
///
/// Returns `true` if there are no more elements in the iterator, and
/// `false` if there are.
///
/// # Examples
///
/// Basic usage:
///
/// ```
/// #![feature(peekable_is_empty)]
///
/// let xs = [1, 2, 3];
///
/// let mut iter = xs.iter().peekable();
///
/// // There are still elements to iterate over
/// assert_eq!(iter.is_empty(), false);
///
/// // Let's consume the iterator
/// iter.next();
/// iter.next();
/// iter.next();
///
/// assert_eq!(iter.is_empty(), true);
/// ```
#[unstable(feature = "peekable_is_empty", issue = "32111")]
#[inline]
#[rustc_deprecated(since = "1.10.0", reason = "replaced by .peek().is_none()")]
pub fn is_empty(&mut self) -> bool {
self.peek().is_none()
}
}

/// An iterator that rejects elements while `predicate` is true.
Expand Down
Loading