Skip to content

Commit

Permalink
Stabilize std::sync::mpsc::Receiver::try_iter
Browse files Browse the repository at this point in the history
  • Loading branch information
aturon committed Dec 15, 2016
1 parent 3188ed5 commit 9e8fd24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libstd/sync/mpsc/mod.rs
Expand Up @@ -316,7 +316,7 @@ pub struct Iter<'a, T: 'a> {
///
/// This Iterator will never block the caller in order to wait for data to
/// become available. Instead, it will return `None`.
#[unstable(feature = "receiver_try_iter", issue = "34931")]
#[stable(feature = "receiver_try_iter", since = "1.15.0")]
pub struct TryIter<'a, T: 'a> {
rx: &'a Receiver<T>
}
Expand Down Expand Up @@ -1008,7 +1008,7 @@ impl<T> Receiver<T> {
/// It will return `None` if there are no more pending values or if the
/// channel has hung up. The iterator will never `panic!` or block the
/// user by waiting for values.
#[unstable(feature = "receiver_try_iter", issue = "34931")]
#[stable(feature = "receiver_try_iter", since = "1.15.0")]
pub fn try_iter(&self) -> TryIter<T> {
TryIter { rx: self }
}
Expand Down Expand Up @@ -1108,7 +1108,7 @@ impl<'a, T> Iterator for Iter<'a, T> {
fn next(&mut self) -> Option<T> { self.rx.recv().ok() }
}

#[unstable(feature = "receiver_try_iter", issue = "34931")]
#[stable(feature = "receiver_try_iter", since = "1.15.0")]
impl<'a, T> Iterator for TryIter<'a, T> {
type Item = T;

Expand Down

0 comments on commit 9e8fd24

Please sign in to comment.