You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, Vec<T>'s module and type doc pages don't quite make it clear that its contents are in fact contiguous. They imply it in several places...
Vectors have O(1) indexing, amortized O(1) push (to the end) and O(1) pop (from the end).
Most fundamentally, Vec is and always will be a (pointer, capacity, length) triplet. No more, no less.
...but it would be better to make it more clear. In addition, Vec<T>'s documentation refers to it as a "growable list type", which could be misleading in light of this; "list" is more often used to mean a linked list.
Perhaps something like one of these would be better as the description line:
A contiguous growable list type with heap-allocated contents, written Vec<T> but pronounced 'vector.'
A growable array type with heap-allocated contents, written Vec<T> but pronounced 'vector.'