Function set_element

Source
pub fn set_element<T: Clone>(a: &mut Vec<T>, index: isize, value: T)
Expand description

setElement(array, index, value) – panics if out of range except allowing index == len (append) in the original? JS code forbade index > length. If index == len we append.