The documentation of Vec
contradicts itself regarding with_capacity
#101316
Labels
A-docs
Area: Documentation for any part of the project, including the compiler, standard library, and tools
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". :(
The text was updated successfully, but these errors were encountered: