1
Fork 0

Add Extend::{extend_one,extend_reserve}

This adds new optional methods on `Extend`: `extend_one` add a single
element to the collection, and `extend_reserve` pre-allocates space for
the predicted number of incoming elements. These are used in `Iterator`
for `partition` and `unzip` as they shuffle elements one-at-a-time into
their respective collections.
This commit is contained in:
Josh Stone 2020-05-12 20:09:55 -07:00
parent 4bd32c9804
commit 6700e18688
21 changed files with 251 additions and 5 deletions

View file

@ -263,6 +263,7 @@
#![feature(duration_constants)]
#![feature(exact_size_is_empty)]
#![feature(exhaustive_patterns)]
#![feature(extend_one)]
#![feature(external_doc)]
#![feature(fn_traits)]
#![feature(format_args_nl)]