Skip to content

Commit a2b927c

Browse files
committed
Auto merge of #26817 - cmr:vecdeque-docs, r=Gankro
None
2 parents d0fdfbf + f5ea620 commit a2b927c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcollections/vec_deque.rs

+4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ const MINIMUM_CAPACITY: usize = 1; // 2 - 1
3838

3939
/// `VecDeque` is a growable ring buffer, which can be used as a
4040
/// double-ended queue efficiently.
41+
///
42+
/// The "default" usage of this type as a queue is to use `push_back` to add to the queue, and
43+
/// `pop_front` to remove from the queue. `extend` and `append` push onto the back in this manner,
44+
/// and iterating over `VecDeque` goes front to back.
4145
#[stable(feature = "rust1", since = "1.0.0")]
4246
pub struct VecDeque<T> {
4347
// tail and head are pointers into the buffer. Tail always points

0 commit comments

Comments
 (0)