]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #85835 - Seppel3210:master, r=yaahc
authorYuki Okushi <jtitor@2k36.org>
Thu, 12 Aug 2021 06:32:53 +0000 (15:32 +0900)
committerGitHub <noreply@github.com>
Thu, 12 Aug 2021 06:32:53 +0000 (15:32 +0900)
commit688094b868f4ebe344c06ea2ba5b445ebef6ae67
tree8182bfdab64565050a0d1ab3bd2474ac56f64ed9
parent25d3e14da77f755ef858b976a25c7e856b62b42a
parent3d0c5d09d33d74a508965799fcde6e8147cee721
Rollup merge of #85835 - Seppel3210:master, r=yaahc

Implement Extend<(A, B)> for (Extend<A>, Extend<B>)

I oriented myself at the implementation of `Iterator::unzip` and also rewrote the impl in terms of `(A, B)::extend` after that.

Since (A, B) now also implements Extend we could also mention in the documentation of unzip that it can do "nested unzipping" (you could unzip `Iterator<Item=(A, (B, C))>` into `(Vec<A>, (Vec<B>, Vec<C>))` for example) but I'm not sure of that so I'm asking here ðŸ™‚

(P.S. I saw a couple of people asking if there is an unzip3 but there isn't. So this could be a way to get equivalent functionality)
library/core/src/iter/traits/collect.rs
library/core/src/iter/traits/iterator.rs