]> git.lizzy.rs Git - rust.git/commitdiff
Improve some docs for VecDeque
authorStjepan Glavina <stjepang@gmail.com>
Fri, 31 Mar 2017 15:12:47 +0000 (17:12 +0200)
committerStjepan Glavina <stjepang@gmail.com>
Fri, 31 Mar 2017 15:12:47 +0000 (17:12 +0200)
src/libcollections/vec_deque.rs

index cb92236ec736cf8928f92da43e8efb5921d7feea..c37bf752e86bc492b7eb57566cbd53dfc3ca6000 100644 (file)
@@ -635,7 +635,7 @@ pub fn shrink_to_fit(&mut self) {
         }
     }
 
-    /// Shortens a `VecDeque`, dropping excess elements from the back.
+    /// Shortens the `VecDeque`, dropping excess elements from the back.
     ///
     /// If `len` is greater than the `VecDeque`'s current length, this has no
     /// effect.
@@ -941,7 +941,7 @@ pub fn contains(&self, x: &T) -> bool
         a.contains(x) || b.contains(x)
     }
 
-    /// Provides a reference to the front element, or `None` if the sequence is
+    /// Provides a reference to the front element, or `None` if the `VecDeque` is
     /// empty.
     ///
     /// # Examples
@@ -966,7 +966,7 @@ pub fn front(&self) -> Option<&T> {
     }
 
     /// Provides a mutable reference to the front element, or `None` if the
-    /// sequence is empty.
+    /// `VecDeque` is empty.
     ///
     /// # Examples
     ///
@@ -993,7 +993,7 @@ pub fn front_mut(&mut self) -> Option<&mut T> {
         }
     }
 
-    /// Provides a reference to the back element, or `None` if the sequence is
+    /// Provides a reference to the back element, or `None` if the `VecDeque` is
     /// empty.
     ///
     /// # Examples
@@ -1018,7 +1018,7 @@ pub fn back(&self) -> Option<&T> {
     }
 
     /// Provides a mutable reference to the back element, or `None` if the
-    /// sequence is empty.
+    /// `VecDeque` is empty.
     ///
     /// # Examples
     ///
@@ -1046,7 +1046,7 @@ pub fn back_mut(&mut self) -> Option<&mut T> {
         }
     }
 
-    /// Removes the first element and returns it, or `None` if the sequence is
+    /// Removes the first element and returns it, or `None` if the `VecDeque` is
     /// empty.
     ///
     /// # Examples
@@ -1073,7 +1073,7 @@ pub fn pop_front(&mut self) -> Option<T> {
         }
     }
 
-    /// Inserts an element first in the sequence.
+    /// Prepends an element to the front of the `VecDeque`.
     ///
     /// # Examples
     ///
@@ -1096,7 +1096,7 @@ pub fn push_front(&mut self, value: T) {
         }
     }
 
-    /// Appends an element to the back of a buffer
+    /// Appends an element to the back of the `VecDeque`.
     ///
     /// # Examples
     ///
@@ -1117,7 +1117,7 @@ pub fn push_back(&mut self, value: T) {
         unsafe { self.buffer_write(head, value) }
     }
 
-    /// Removes the last element from a buffer and returns it, or `None` if
+    /// Removes the last element from the `VecDeque` and returns it, or `None` if
     /// it is empty.
     ///
     /// # Examples