/// Divides a mutable slice into a lower slice, the pivot item, and an upper slice.
///
/// - The lower slice contains all items with an index < `position`.
/// - The upper slice contains all items with an index > `position`.
/// - The pivot element is located at `position`.
///
/// # Panics
///
/// Panics if `position >= slice.len()`.
///
/// # Example
///
/// ```ignore
/// let vec = vec![0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
/// let (lower, pivot, upper) = split_pivot_mut(&mut vec, 4);
/// assert_eq!(lower, [0, 1, 2, 3]);
/// assert_eq!(*pivot, 4);
/// assert_eq!(upper, [5, 6, 7, 8, 9]);
/// ```
Divides a mutable slice into a lower slice, the pivot item, and an upper slice.
The lower slice contains all items with an index < `position`.
The upper slice contains all items with an index > `position`.
The pivot element is located at `position`.
Divides a mutable slice into a lower slice the pivot item and an upper slice . The lower slice contains all items with an index < ` position ` . The upper slice contains all items with an index > ` position ` . The pivot element is located at ` position ` .
pub fn split_pivot_mut<'a, T>(
    slice: &'a mut [T],
    position: usize,
) -> (&'a mut [T], &'a mut T, &'a mut [T]) {
    assert!(position < slice.len());
    let (lower, rest) = slice.split_at_mut(position);
    let (pivot, upper) = rest.split_first_mut().unwrap();
    (lower, pivot, upper)
}
pub fn split_pivot_mut < ' a , T > ( slice : & ' a mut [ T ] , position : usize , ) -> ( & ' a mut [ T ] , & ' a mut T , & ' a mut [ T ] ) { assert ! ( position slice len ( ) ) ; let ( lower , rest ) = slice . split_at_mut ( position ) ; let ( pivot , upper ) = rest . split_first_mut ( ) . unwrap ( ) ; ( lower , pivot , upper ) }
Divides a mutable slice into a lower slice, the pivot item, and an upper slice.
Divides a mutable slice into a lower slice the pivot item and an upper slice .
slice
&'a mut [T]
position
usize
panics
Panics if `position >= slice.len()`.
Panics if ` position > = slice . len () ` .
example
None