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

Add function core::iter::chain #106186

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Commits on Jun 4, 2024

  1. Add function core::iter::chain

    The addition of `core::iter::zip` (rust-lang#82917) set a precedent for adding
    plain functions for iterator adaptors. Adding `chain` makes it a little
    easier to `chain` two iterators.
    
    ```
    for (x, y) in chain(xs, ys) {}
    // vs.
    for (x, y) in xs.into_iter().chain(ys) {}
    ```
    rossmacarthur committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    6a84995 View commit details
    Browse the repository at this point in the history