fn assert_stable<T: Ord + Debug>(presorted: &[T]) {
        for slice in presorted.windows(2) {
            let a = &slice[0];
            let b = &slice[1];

            assert_eq!(a, cmp::min(a, b));
            assert_eq!(b, cmp::max(a, b));
        }
    }
// Assert that sorted and min/max are the same
Assert that sorted and min/max are the same
Assert that sorted and min / max are the same
fn assert_stable<T: Ord + Debug>(presorted: &[T]) {
        for slice in presorted.windows(2) {
            let a = &slice[0];
            let b = &slice[1];
            assert_eq!(a, cmp::min(a, b));
            assert_eq!(b, cmp::max(a, b));
        }
    }
fn assert_stable < T : Ord + Debug > ( presorted : & [ T ] ) { for slice in presorted . windows ( 2 ) { let a = & slice [ 0 ] ; let b = & slice [ 1 ] ; assert_eq ! ( a cmp min ( a b ) ) ; assert_eq ! ( b cmp max ( a b ) ) ; } }
Assert that sorted and min/max are the same
Assert that sorted and min / max are the same
presorted
&[T]
presorted
&[T]