Skip to content

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

library/core/src/slice/mod.rs

+5-8
Original file line numberDiff line numberDiff line change
@@ -1357,14 +1357,11 @@ impl<T> [T] {
13571357
///
13581358
/// ```
13591359
/// let mut v = [1, 0, 3, 0, 5, 6];
1360-
/// // scoped to restrict the lifetime of the borrows
1361-
/// {
1362-
/// let (left, right) = v.split_at_mut(2);
1363-
/// assert_eq!(left, [1, 0]);
1364-
/// assert_eq!(right, [3, 0, 5, 6]);
1365-
/// left[1] = 2;
1366-
/// right[1] = 4;
1367-
/// }
1360+
/// let (left, right) = v.split_at_mut(2);
1361+
/// assert_eq!(left, [1, 0]);
1362+
/// assert_eq!(right, [3, 0, 5, 6]);
1363+
/// left[1] = 2;
1364+
/// right[1] = 4;
13681365
/// assert_eq!(v, [1, 2, 3, 4, 5, 6]);
13691366
/// ```
13701367
#[stable(feature = "rust1", since = "1.0.0")]

0 commit comments

Comments
 (0)