rust-lang:master ← matklad:collect_array
opened 11:09AM - 03 Dec 20 UTC
With const-generics, we can now collect exactly `N` elements out of
the iterato…r.
Very similar API existed in the itertools crate for quite some time:
https://docs.rs/itertools/0.9.0/itertools/trait.Itertools.html#method.collect_tuple
This needs more thorough tests before merging (esp around `Drop` & panic), I'll add them if this API as a whole feels like a good idea.