Rollup merge of #122642 - pallix:improve-wording-for-vec-swap_remove, r=Amanieu

Improve wording of `Vec::swap_remove`

This improve the wording for  `Vec::swap_remove`.
This commit is contained in:
Matthias Krüger 2024-03-18 22:24:38 +01:00 committed by GitHub
commit 223c23c63f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1462,7 +1462,7 @@ impl<T, A: Allocator> Vec<T, A> {
///
/// 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