Skip to content

Consider adding a foreach-like iterator adapter #1070

Closed
@steveklabnik

Description

@steveklabnik

Proposed in #582 and #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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-libs-apiRelevant to the library API team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions