Skip to content

Commit f74ca38

Browse files
committed
Refactored swap_remove doc comment upon discussing with BurntSushi and steveklabnik
1 parent 255d919 commit f74ca38

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/libcollections/vec.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,9 @@ impl<T> Vec<T> {
678678
self.len = len;
679679
}
680680

681-
/// Removes an element from anywhere in the vector and returns it, replacing
682-
/// it with the last element.
681+
/// Removes an element from the vector and returns it.
682+
///
683+
/// The removed element is replaced by the last element of the vector.
683684
///
684685
/// This does not preserve ordering, but is O(1).
685686
///

0 commit comments

Comments
 (0)