From f74ca38686e84542657136bd063f8042d9bbb641 Mon Sep 17 00:00:00 2001 From: mandeep Date: Mon, 3 Apr 2017 09:51:34 -0500 Subject: [PATCH] Refactored swap_remove doc comment upon discussing with BurntSushi and steveklabnik --- src/libcollections/vec.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 44ac4f1cff58..8a3fa94d4c1e 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -678,8 +678,9 @@ impl Vec { 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). ///