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
1 changed files with 2 additions and 0 deletions
|
@ -851,6 +851,8 @@ impl<T> [T] {
|
|||
|
||||
/// Swaps two elements in the slice.
|
||||
///
|
||||
/// If `a` equals to `b`, it's guaranteed that elements won't change value.
|
||||
///
|
||||
/// # Arguments
|
||||
///
|
||||
/// * a - The index of the first element
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue