Skip to content
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

Consider adding a .foreach()-like method to Iterator #24566

Closed
alexcrichton opened this issue Apr 18, 2015 · 2 comments
Closed

Consider adding a .foreach()-like method to Iterator #24566

alexcrichton opened this issue Apr 18, 2015 · 2 comments

Comments

@alexcrichton
Copy link
Member

Proposed in rust-lang/rfcs#582 and rust-lang/rfcs#1064, the Iterator trait could have a .foreach method which drains the iterator immediately and runs a closure on each element to concisely do so without a for loop.

@steveklabnik
Copy link
Member

should be over here instead: rust-lang/rfcs#1070

@alexcrichton
Copy link
Member Author

Oh oops! I meant for this to be in rust-lang/rfcs but wasn't paying attention...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants