@@ -134,7 +134,7 @@ pub trait SliceExt {
134
134
///
135
135
/// # Examples
136
136
///
137
- /// ```rust
137
+ /// ```
138
138
/// let mut v = [5, 4, 1, 3, 2];
139
139
/// v.sort_by(|a, b| a.cmp(b));
140
140
/// assert!(v == [1, 2, 3, 4, 5]);
@@ -160,7 +160,7 @@ pub trait SliceExt {
160
160
///
161
161
/// # Examples
162
162
///
163
- /// ```rust
163
+ /// ```
164
164
/// let mut a = [1, 2, 3, 4, 5];
165
165
/// let b = vec![6, 7, 8];
166
166
/// let num_moved = a.move_from(b, 0, 3);
@@ -282,7 +282,7 @@ pub trait SliceExt {
282
282
/// Print the adjacent pairs of a slice (i.e. `[1,2]`, `[2,3]`,
283
283
/// `[3,4]`):
284
284
///
285
- /// ```rust
285
+ /// ```
286
286
/// let v = &[1, 2, 3, 4];
287
287
/// for win in v.windows(2) {
288
288
/// println!("{:?}", win);
@@ -305,7 +305,7 @@ pub trait SliceExt {
305
305
/// Print the slice two elements at a time (i.e. `[1,2]`,
306
306
/// `[3,4]`, `[5]`):
307
307
///
308
- /// ```rust
308
+ /// ```
309
309
/// let v = &[1, 2, 3, 4, 5];
310
310
/// for win in v.chunks(2) {
311
311
/// println!("{:?}", win);
@@ -396,7 +396,7 @@ pub trait SliceExt {
396
396
/// uniquely determined position; the second and third are not
397
397
/// found; the fourth could match any position in `[1,4]`.
398
398
///
399
- /// ```rust
399
+ /// ```
400
400
/// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
401
401
/// let s = s.as_slice();
402
402
///
@@ -531,7 +531,7 @@ pub trait SliceExt {
531
531
///
532
532
/// # Examples
533
533
///
534
- /// ```rust
534
+ /// ```
535
535
/// let mut v = ["a", "b", "c", "d"];
536
536
/// v.swap(1, 3);
537
537
/// assert!(v == ["a", "d", "c", "b"]);
@@ -551,7 +551,7 @@ pub trait SliceExt {
551
551
///
552
552
/// # Examples
553
553
///
554
- /// ```rust
554
+ /// ```
555
555
/// let mut v = [1, 2, 3, 4, 5, 6];
556
556
///
557
557
/// // scoped to restrict the lifetime of the borrows
@@ -580,7 +580,7 @@ pub trait SliceExt {
580
580
///
581
581
/// # Examples
582
582
///
583
- /// ```rust
583
+ /// ```
584
584
/// let mut v = [1, 2, 3];
585
585
/// v.reverse();
586
586
/// assert!(v == [3, 2, 1]);
@@ -612,7 +612,7 @@ pub trait SliceExt {
612
612
///
613
613
/// # Examples
614
614
///
615
- /// ```rust
615
+ /// ```
616
616
/// let v = [1, 2, 3];
617
617
/// let mut perms = v.permutations();
618
618
///
@@ -623,7 +623,7 @@ pub trait SliceExt {
623
623
///
624
624
/// Iterating through permutations one by one.
625
625
///
626
- /// ```rust
626
+ /// ```
627
627
/// let v = [1, 2, 3];
628
628
/// let mut perms = v.permutations();
629
629
///
@@ -640,7 +640,7 @@ pub trait SliceExt {
640
640
///
641
641
/// # Examples
642
642
///
643
- /// ```rust
643
+ /// ```
644
644
/// let mut dst = [0, 0, 0];
645
645
/// let src = [1, 2];
646
646
///
@@ -660,7 +660,7 @@ pub trait SliceExt {
660
660
///
661
661
/// # Examples
662
662
///
663
- /// ```rust
663
+ /// ```
664
664
/// let mut v = [-5, 4, 1, -3, 2];
665
665
///
666
666
/// v.sort();
@@ -682,7 +682,7 @@ pub trait SliceExt {
682
682
/// uniquely determined position; the second and third are not
683
683
/// found; the fourth could match any position in `[1,4]`.
684
684
///
685
- /// ```rust
685
+ /// ```
686
686
/// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
687
687
/// let s = s.as_slice();
688
688
///
@@ -709,7 +709,7 @@ pub trait SliceExt {
709
709
///
710
710
/// # Examples
711
711
///
712
- /// ```rust
712
+ /// ```
713
713
/// let v: &mut [_] = &mut [0, 1, 2];
714
714
/// v.next_permutation();
715
715
/// let b: &mut [_] = &mut [0, 2, 1];
@@ -729,7 +729,7 @@ pub trait SliceExt {
729
729
///
730
730
/// # Examples
731
731
///
732
- /// ```rust
732
+ /// ```
733
733
/// let v: &mut [_] = &mut [1, 0, 2];
734
734
/// v.prev_permutation();
735
735
/// let b: &mut [_] = &mut [0, 2, 1];
0 commit comments