Skip to content

Commit

Permalink
stabilized iterator_for_each (closes #42986)
Browse files Browse the repository at this point in the history
updated clippy and rls as it uses the iterator_for_each
  • Loading branch information
budziq committed Sep 16, 2017
1 parent ae8efdc commit b715290
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
17 changes: 0 additions & 17 deletions src/doc/unstable-book/src/library-features/iterator-for-each.md

This file was deleted.

6 changes: 1 addition & 5 deletions src/libcore/iter/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,6 @@ pub trait Iterator {
/// Basic usage:
///
/// ```
/// #![feature(iterator_for_each)]
///
/// use std::sync::mpsc::channel;
///
/// let (tx, rx) = channel();
Expand All @@ -514,15 +512,13 @@ pub trait Iterator {
/// might be preferable to keep a functional style with longer iterators:
///
/// ```
/// #![feature(iterator_for_each)]
///
/// (0..5).flat_map(|x| x * 100 .. x * 110)
/// .enumerate()
/// .filter(|&(i, x)| (i + x) % 3 == 0)
/// .for_each(|(i, x)| println!("{}:{}", i, x));
/// ```
#[inline]
#[unstable(feature = "iterator_for_each", issue = "42986")]
#[stable(feature = "iterator_for_each", since = "1.22.0")]
fn for_each<F>(self, mut f: F) where
Self: Sized, F: FnMut(Self::Item),
{
Expand Down
2 changes: 1 addition & 1 deletion src/tools/rls
Submodule rls updated from 52d486 to 7221e3

0 comments on commit b715290

Please sign in to comment.