Skip to content
/ rust Public
forked from rust-lang/rust

Commit

Permalink
stabilized iterator_for_each (closes rust-lang#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 authored and dtolnay committed Sep 25, 2017
1 parent df8fec1 commit 7b61414
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 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

0 comments on commit 7b61414

Please sign in to comment.