mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
std: edit [T]::swap docs
Add a note telling that no elements change when arguments are equal
This commit is contained in:
parent
27e10c5292
commit
30c61eece4
@ -851,6 +851,8 @@ impl<T> [T] {
|
|||||||
|
|
||||||
/// Swaps two elements in the slice.
|
/// Swaps two elements in the slice.
|
||||||
///
|
///
|
||||||
|
/// If `a` equals to `b`, it's guaranteed that elements won't change value.
|
||||||
|
///
|
||||||
/// # Arguments
|
/// # Arguments
|
||||||
///
|
///
|
||||||
/// * a - The index of the first element
|
/// * a - The index of the first element
|
||||||
|
Loading…
Reference in New Issue
Block a user