mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
clarify vector stub in the container tutorial
This also renames the section, as managed vectors cannot be resized (since it would invalidate the other references).
This commit is contained in:
parent
e12c3bfbf9
commit
d12e0305b1
@ -4,11 +4,11 @@
|
||||
|
||||
The container traits are defined in the `std::container` module.
|
||||
|
||||
## Unique and managed vectors
|
||||
## Unique vectors
|
||||
|
||||
Vectors have `O(1)` indexing and removal from the end, along with `O(1)`
|
||||
amortized insertion. Vectors are the most common container in Rust, and are
|
||||
flexible enough to fit many use cases.
|
||||
Vectors have `O(1)` indexing, push (to the end) and pop (from the end). Vectors
|
||||
are the most common container in Rust, and are flexible enough to fit many use
|
||||
cases.
|
||||
|
||||
Vectors can also be sorted and used as efficient lookup tables with the
|
||||
`std::vec::bsearch` function, if all the elements are inserted at one time and
|
||||
|
Loading…
Reference in New Issue
Block a user