Changed slice.swap documentation for better readability
using "b" and "d" can be easily confused
This commit is contained in:
parent
32f3887b9b
commit
32a3edb153
1 changed files with 3 additions and 3 deletions
|
@ -553,9 +553,9 @@ impl<T> [T] {
|
|||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// let mut v = ["a", "b", "c", "d"];
|
||||
/// v.swap(1, 3);
|
||||
/// assert!(v == ["a", "d", "c", "b"]);
|
||||
/// let mut v = ["a", "b", "c", "d", "e];
|
||||
/// v.swap(2, 4);
|
||||
/// assert!(v == ["a", "b", "e", "d", "c"]);
|
||||
/// ```
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[inline]
|
||||
|
|
Loading…
Reference in a new issue