pub fn retain_max_n_elements<T>(v: &mut Vec<T>, n: usize)
Expand description

Helper function to retain only max n of elements to the right of a vector, viz. remove v.len() - n elements from the left of the vector.