mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-02 09:47:57 +00:00
Upgrade `thin-vec` to 0.2.21, including fix for `.collect()` capacity This includes https://github.com/mozilla/thin-vec/pull/99 , which makes thin-vec respect size_hint when collecting. In particular, this causes collections of 1-3 items to not be grown to a capacity of 4. The compiler has a lot of `TinyVec`s in the 1-3 range, so this substantially helps memory, and seems neutral on instructions. For aws-sdk-ec2 full check, this saves 30.69 MiB max-rss (0.55% of peak RSS). --- Merging this avoids the need to work around it in other work (e.g. by replacing `.collect()` with something calling `ThinVec::with_capacity(...)` first).