Skip to content

Commit

Permalink
Rollup merge of rust-lang#34974 - abhijeetbhagat:patch-2, r=Guillaume…
Browse files Browse the repository at this point in the history
…Gomez

Update VecDeque documentation to specify direction of index 0 (rust-lang#34920)

I mentioned the direction for all the methods that work with an index
  • Loading branch information
steveklabnik authored Jul 25, 2016
2 parents 637b63a + 0d192c3 commit 7027fd9
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/libcollections/vec_deque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ impl<T> VecDeque<T> {

/// Retrieves an element in the `VecDeque` by index.
///
/// Element at index 0 is the front of the queue.
///
/// # Examples
///
/// ```
Expand All @@ -425,6 +427,8 @@ impl<T> VecDeque<T> {

/// Retrieves an element in the `VecDeque` mutably by index.
///
/// Element at index 0 is the front of the queue.
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -456,6 +460,8 @@ impl<T> VecDeque<T> {
///
/// Fails if there is no element with either index.
///
/// Element at index 0 is the front of the queue.
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -1180,6 +1186,8 @@ impl<T> VecDeque<T> {
///
/// Returns `None` if `index` is out of bounds.
///
/// Element at index 0 is the front of the queue.
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -1214,6 +1222,8 @@ impl<T> VecDeque<T> {
///
/// Returns `None` if `index` is out of bounds.
///
/// Element at index 0 is the front of the queue.
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -1245,6 +1255,8 @@ impl<T> VecDeque<T> {
/// end is closer to the insertion point will be moved to make room,
/// and all the affected elements will be moved to new positions.
///
/// Element at index 0 is the front of the queue.
///
/// # Panics
///
/// Panics if `index` is greater than `VecDeque`'s length
Expand Down Expand Up @@ -1472,6 +1484,8 @@ impl<T> VecDeque<T> {
/// room, and all the affected elements will be moved to new positions.
/// Returns `None` if `index` is out of bounds.
///
/// Element at index 0 is the front of the queue.
///
/// # Examples
///
/// ```
Expand Down Expand Up @@ -1651,6 +1665,8 @@ impl<T> VecDeque<T> {
///
/// Note that the capacity of `self` does not change.
///
/// Element at index 0 is the front of the queue.
///
/// # Panics
///
/// Panics if `at > len`
Expand Down

0 comments on commit 7027fd9

Please sign in to comment.