rust/library/core
bors 0fe1dc6ac2 Auto merge of #79451 - usbalbin:array_zip, r=m-ou-se
Added [T; N]::zip()

This is my first PR to rust so I hope I have done everything right, or at least close :)

---

This is PR adds the array method `[T; N]::zip()` which, in my mind, is a natural extension to #75212.

My implementation of `zip()` is mostly just a modified copy-paste of `map()`. Should I keep the comments? Also am I right in assuming there should be no way for the `for`-loop to panic, thus no need for the dropguard seen in the `map()`-function?

The doc comment is in a similar way a slightly modified copy paste of [`Iterator::zip()`](https://doc.rust-lang.org/beta/std/iter/trait.Iterator.html#method.zip)

`@jplatte` mentioned in [#75490](https://github.com/rust-lang/rust/pull/75490#issuecomment-677790758) `zip_with()`,
> zip and zip_with seem like they would be useful :)

is this something I should add (assuming there is interest for this PR at all :))
2020-12-22 13:19:40 +00:00
..
benches Remove redundant 'static from library crates 2020-10-18 17:25:51 +02:00
src Auto merge of #79451 - usbalbin:array_zip, r=m-ou-se 2020-12-22 13:19:40 +00:00
tests Fix unused import error on wasm 2020-12-18 14:53:55 -08:00
Cargo.toml mv std libs to library/ 2020-07-27 19:51:13 -05:00