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 15, 2017
1 parent 84bbd14 commit 8772227
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 26 deletions.
6 changes: 3 additions & 3 deletions src/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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
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 8dd709 to 7221e3

0 comments on commit 8772227

Please sign in to comment.