rust/library/alloc/src/vec
Nicholas Nethercote 6a83352aa3 Introduce RawVec::reserve_for_push.
If `Vec::push`'s capacity check fails it calls `RawVec::reserve`, which
then also does a capacity check.

This commit introduces `reserve_for_push` which skips the redundant
capacity check, for some slight compile time speed-ups.

I tried lots of minor variations on this, e.g. different inlining
attributes. This was the best one I could find.
2021-11-30 08:10:47 +11:00
..
cow.rs Document From impls for cow.rs 2021-05-26 14:21:44 +00:00
drain.rs Add #[must_use] to remaining alloc functions 2021-10-15 11:46:49 -04:00
drain_filter.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
in_place_drop.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
into_iter.rs Rollup merge of #89413 - matthewjasper:spec-marker-fix, r=nikomatsakis 2021-10-04 21:12:35 -07:00
is_zero.rs Fix a typo 2021-05-30 00:06:27 +02:00
mod.rs Introduce RawVec::reserve_for_push. 2021-11-30 08:10:47 +11:00
partial_eq.rs alloc: Add unstable Cfg feature no-global_oom_handling 2021-05-05 16:49:04 -04:00
set_len_on_drop.rs refactor: moved SetLenOnDrop to set_len_on_drop 2020-12-29 14:03:30 +00:00
source_iter_marker.rs Fix standard library for min_specialization changes 2021-09-30 21:42:41 +01:00
spec_extend.rs Add comments around code where ordering is important due for panic-safety 2021-06-22 19:06:55 +02:00
spec_from_elem.rs style: applying Rust style 2020-12-29 14:03:30 +00:00
spec_from_iter.rs Update documentation of SpecFromIter to reflect the removed impls 2021-05-31 21:07:03 +02:00
spec_from_iter_nested.rs panic early when TrustedLen indicates a length > usize::MAX 2021-03-31 23:09:28 +02:00
splice.rs Update expressions where we can use array's IntoIterator implementation 2021-06-02 16:09:04 +06:00