Improve wording of Vec::swap_remove

This commit is contained in:
Pierre Allix 2024-03-17 15:57:00 +01:00
parent a0c20d52e0
commit 23e1b570d7

View File

@ -1462,7 +1462,7 @@ pub unsafe fn set_len(&mut self, new_len: usize) {
///
/// The removed element is replaced by the last element of the vector.
///
/// This does not preserve ordering, but is *O*(1).
/// This does not preserve ordering of the remaining elements, but is *O*(1).
/// If you need to preserve the element order, use [`remove`] instead.
///
/// [`remove`]: Vec::remove