Function solana_runtime::snapshot_package::retain_max_n_elements
source · 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.