diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-06-04 21:41:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-04 21:41:33 +0200 |
| commit | 190f221dba5d9d89707d4a75974ab7a231bdae1d (patch) | |
| tree | 22cd22720dd50f7599a69254727baf7fe7060bfb /compiler/rustc_interface/src/errors.rs | |
| parent | 44701e070c8453df10df1984944258018ac21610 (diff) | |
| parent | 6a84995fae01eb0ae18ef6bfc41b2979ca760447 (diff) | |
| download | rust-190f221dba5d9d89707d4a75974ab7a231bdae1d.tar.gz rust-190f221dba5d9d89707d4a75974ab7a231bdae1d.zip | |
Rollup merge of #106186 - rossmacarthur:ft/iter-chain, r=Amanieu
Add function `core::iter::chain`
The addition of `core::iter::zip` (#82917) set a precedent for adding plain functions for iterator adaptors. Adding `chain` makes it a little easier to `chain` two iterators.
```rust
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`](https://docs.rs/itertools/latest/itertools/fn.chain.html).
Approved ACP https://github.com/rust-lang/libs-team/issues/154
Diffstat (limited to 'compiler/rustc_interface/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
