]> git.lizzy.rs Git - rust.git/commitdiff
Refactored swap_remove doc comment upon discussing with BurntSushi and steveklabnik
authormandeep <mandeep@users.noreply.github.com>
Mon, 3 Apr 2017 14:51:34 +0000 (09:51 -0500)
committermandeep <mandeep@users.noreply.github.com>
Mon, 3 Apr 2017 14:51:34 +0000 (09:51 -0500)
src/libcollections/vec.rs

index 44ac4f1cff5889569d741ff6e7dbdbaecae8e04d..8a3fa94d4c1ea06c790476654e2a41d46672bd24 100644 (file)
@@ -678,8 +678,9 @@ pub unsafe fn set_len(&mut self, len: usize) {
         self.len = len;
     }
 
-    /// Removes an element from anywhere in the vector and returns it, replacing
-    /// it with the last element.
+    /// Removes an element from the vector and returns it.
+    /// 
+    /// The removed element is replaced by the last element of the vector.
     ///
     /// This does not preserve ordering, but is O(1).
     ///