@@ -136,7 +136,7 @@ pub trait SliceExt {
136
136
///
137
137
/// # Examples
138
138
///
139
- /// ```rust
139
+ /// ```
140
140
/// let mut v = [5, 4, 1, 3, 2];
141
141
/// v.sort_by(|a, b| a.cmp(b));
142
142
/// assert!(v == [1, 2, 3, 4, 5]);
@@ -162,7 +162,7 @@ pub trait SliceExt {
162
162
///
163
163
/// # Examples
164
164
///
165
- /// ```rust
165
+ /// ```
166
166
/// let mut a = [1, 2, 3, 4, 5];
167
167
/// let b = vec![6, 7, 8];
168
168
/// let num_moved = a.move_from(b, 0, 3);
@@ -284,7 +284,7 @@ pub trait SliceExt {
284
284
/// Print the adjacent pairs of a slice (i.e. `[1,2]`, `[2,3]`,
285
285
/// `[3,4]`):
286
286
///
287
- /// ```rust
287
+ /// ```
288
288
/// let v = &[1, 2, 3, 4];
289
289
/// for win in v.windows(2) {
290
290
/// println!("{:?}", win);
@@ -307,7 +307,7 @@ pub trait SliceExt {
307
307
/// Print the slice two elements at a time (i.e. `[1,2]`,
308
308
/// `[3,4]`, `[5]`):
309
309
///
310
- /// ```rust
310
+ /// ```
311
311
/// let v = &[1, 2, 3, 4, 5];
312
312
/// for win in v.chunks(2) {
313
313
/// println!("{:?}", win);
@@ -398,7 +398,7 @@ pub trait SliceExt {
398
398
/// uniquely determined position; the second and third are not
399
399
/// found; the fourth could match any position in `[1,4]`.
400
400
///
401
- /// ```rust
401
+ /// ```
402
402
/// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
403
403
/// let s = s.as_slice();
404
404
///
@@ -533,7 +533,7 @@ pub trait SliceExt {
533
533
///
534
534
/// # Examples
535
535
///
536
- /// ```rust
536
+ /// ```
537
537
/// let mut v = ["a", "b", "c", "d"];
538
538
/// v.swap(1, 3);
539
539
/// assert!(v == ["a", "d", "c", "b"]);
@@ -553,7 +553,7 @@ pub trait SliceExt {
553
553
///
554
554
/// # Examples
555
555
///
556
- /// ```rust
556
+ /// ```
557
557
/// let mut v = [1, 2, 3, 4, 5, 6];
558
558
///
559
559
/// // scoped to restrict the lifetime of the borrows
@@ -582,7 +582,7 @@ pub trait SliceExt {
582
582
///
583
583
/// # Examples
584
584
///
585
- /// ```rust
585
+ /// ```
586
586
/// let mut v = [1, 2, 3];
587
587
/// v.reverse();
588
588
/// assert!(v == [3, 2, 1]);
@@ -614,7 +614,7 @@ pub trait SliceExt {
614
614
///
615
615
/// # Examples
616
616
///
617
- /// ```rust
617
+ /// ```
618
618
/// let v = [1, 2, 3];
619
619
/// let mut perms = v.permutations();
620
620
///
@@ -625,7 +625,7 @@ pub trait SliceExt {
625
625
///
626
626
/// Iterating through permutations one by one.
627
627
///
628
- /// ```rust
628
+ /// ```
629
629
/// let v = [1, 2, 3];
630
630
/// let mut perms = v.permutations();
631
631
///
@@ -642,7 +642,7 @@ pub trait SliceExt {
642
642
///
643
643
/// # Examples
644
644
///
645
- /// ```rust
645
+ /// ```
646
646
/// let mut dst = [0, 0, 0];
647
647
/// let src = [1, 2];
648
648
///
@@ -662,7 +662,7 @@ pub trait SliceExt {
662
662
///
663
663
/// # Examples
664
664
///
665
- /// ```rust
665
+ /// ```
666
666
/// let mut v = [-5, 4, 1, -3, 2];
667
667
///
668
668
/// v.sort();
@@ -684,7 +684,7 @@ pub trait SliceExt {
684
684
/// uniquely determined position; the second and third are not
685
685
/// found; the fourth could match any position in `[1,4]`.
686
686
///
687
- /// ```rust
687
+ /// ```
688
688
/// let s = [0, 1, 1, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55];
689
689
/// let s = s.as_slice();
690
690
///
@@ -711,7 +711,7 @@ pub trait SliceExt {
711
711
///
712
712
/// # Examples
713
713
///
714
- /// ```rust
714
+ /// ```
715
715
/// let v: &mut [_] = &mut [0, 1, 2];
716
716
/// v.next_permutation();
717
717
/// let b: &mut [_] = &mut [0, 2, 1];
@@ -731,7 +731,7 @@ pub trait SliceExt {
731
731
///
732
732
/// # Examples
733
733
///
734
- /// ```rust
734
+ /// ```
735
735
/// let v: &mut [_] = &mut [1, 0, 2];
736
736
/// v.prev_permutation();
737
737
/// let b: &mut [_] = &mut [0, 2, 1];
0 commit comments