about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-07-06 05:01:21 +0000
committerbors <bors@rust-lang.org>2015-07-06 05:01:21 +0000
commita2b927c5a41ded169a0919ff8193b5357c850217 (patch)
tree94e0a9874ab7713332009ab8a212be6d793b32a1
parentd0fdfbfb0d34f196f52b9d15215723c4785c4afa (diff)
parentf5ea6208e040a9c59824f153c0c8bd11e5efd7c1 (diff)
downloadrust-a2b927c5a41ded169a0919ff8193b5357c850217.tar.gz
rust-a2b927c5a41ded169a0919ff8193b5357c850217.zip
Auto merge of #26817 - cmr:vecdeque-docs, r=Gankro
None
-rw-r--r--src/libcollections/vec_deque.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs
index 5d2065ecb97..2aeb303068b 100644
--- a/src/libcollections/vec_deque.rs
+++ b/src/libcollections/vec_deque.rs
@@ -38,6 +38,10 @@ const MINIMUM_CAPACITY: usize = 1; // 2 - 1
 
 /// `VecDeque` is a growable ring buffer, which can be used as a
 /// double-ended queue efficiently.
+///
+/// The "default" usage of this type as a queue is to use `push_back` to add to the queue, and
+/// `pop_front` to remove from the queue. `extend` and `append` push onto the back in this manner,
+/// and iterating over `VecDeque` goes front to back.
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct VecDeque<T> {
     // tail and head are pointers into the buffer. Tail always points