pub fn swap_first_two<T>(mut vec: Vec<T>) -> Vec<T> {
    if vec.len() < 2 {
        return vec;
    }
    let elem = vec.remove(1);
    vec.insert(0, elem);
    vec
}
// swaps the first two elements of the list if possible
swaps the first two elements of the list if possible
swaps the first two elements of the list if possible
pub fn swap_first_two<T>(mut vec: Vec<T>) -> Vec<T> {
    if vec.len() < 2 {
        return vec;
    }
    let elem = vec.remove(1);
    vec.insert(0, elem);
    vec
}
pub fn swap_first_two < T > ( mut vec : Vec < T > ) -> Vec < T > { if vec . len ( ) < 2 { return vec ; } let elem = vec . remove ( 1 ) ; vec . insert ( 0 , elem ) ; vec }
swaps the first two elements of the list if possible
swaps the first two elements of the list if possible
vec
Vec<T>
vec
Vec<T>