about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-11-30 13:52:38 +0000
committerbors <bors@rust-lang.org>2021-11-30 13:52:38 +0000
commit207c80f105282245d93024c95ac408c622f70114 (patch)
treee05bfbe67697f3d435a8243c1c1921151ecd6bf3 /library/std/src
parent1c0287830e0fb3c4007afea2819ba03766da6e9c (diff)
parent6a83352aa3cb80eb83cb57aba30aad32d3881af7 (diff)
downloadrust-207c80f105282245d93024c95ac408c622f70114.tar.gz
rust-207c80f105282245d93024c95ac408c622f70114.zip
Auto merge of #91352 - nnethercote:RawVec-reserve_for_push, r=dtolnay
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.

r? `@ghost`
Diffstat (limited to 'library/std/src')
0 files changed, 0 insertions, 0 deletions