pub fn extend_with_last<T: Clone + Default>(vec: &mut Vec<T>, new_len: usize)
Extend the vec with last element