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
base: master
Are you sure you want to change the base?
Add function core::iter::chain
#106186
Conversation
(rustbot has picked a reviewer for you, use r? to override) |
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
@rustbot label +T-libs-api -T-libs |
You need to create an ACP first. |
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) {} ``` There is prior art for the utility of this in `itertools::chain`.
f1b8a1a
to
21726c3
Compare
@rustbot label -S-waiting-on-author +S-waiting-on-ACP |
r? libs |
Correction: r? libs-api |
The addition of
core::iter::zip
(#82917) set a precedent for adding plain functions for iterator adaptors. Addingchain
makes it a little easier tochain
two iterators.There is prior art for the utility of this in
itertools::chain
.Pending ACP rust-lang/libs-team#154