Open Kixunil opened 2 years ago
I believe this is being worked on in #99790. Can you take a look at that PR and comment over there if it still seems unclear?
Heh, was trying to find an issue but didn't think of looking at PRs. Will keep open until that merges.
Location
https://doc.rust-lang.org/std/vec/struct.Vec.html
Summary
In section Guarantees the documentation says:
However in
Vec::with_capacity(n)
it says:And
These clearly contradict each-other. I guess it's better for performance to not guarantee capacity but maybe it'd break someones code to change it since it was already "documented". :(