Skip to content

Commit 62370d6

Browse files
committed
Improve wording of Vec::swap_remove
1 parent a0c20d5 commit 62370d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/alloc/src/vec/mod.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1462,8 +1462,8 @@ impl<T, A: Allocator> Vec<T, A> {
14621462
///
14631463
/// The removed element is replaced by the last element of the vector.
14641464
///
1465-
/// This does not preserve ordering, but is *O*(1).
1466-
/// If you need to preserve the element order, use [`remove`] instead.
1465+
/// This does not preserve ordering of the remaining elements, but is *O*(1).
1466+
/// If you need to preserve the elements order, use [`remove`] instead.
14671467
///
14681468
/// [`remove`]: Vec::remove
14691469
///

0 commit comments

Comments
 (0)