Commit 98686ca
committed
Auto merge of #50739 - gnzlbg:vec_reserve, r=sfackler
Switch Vec from doubling size on growth to using RawVec's reserve
On growth, Vec does not require to exactly double its size for correctness,
like, for example, VecDeque does.
Using reserve instead better expresses this intent. It also allows to reuse
Excess capacity on growth and for better growth-policies to be provided by
RawVec.
r? @sfackler1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
840 | | - | |
| 840 | + | |
841 | 841 | | |
842 | 842 | | |
843 | 843 | | |
| |||
1057 | 1057 | | |
1058 | 1058 | | |
1059 | 1059 | | |
1060 | | - | |
| 1060 | + | |
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
| |||
0 commit comments