Function array_append::push_left
source · [−]Expand description
Extends the given element b
by the given array a
. Returns a new array
which is the direct extension of a
by b
. No elements are dropped, copied
or cloned.
Example
let arr = [2usize, 3, 4, 5];
let elem = 1;
let prepended = push_left(arr, elem);
assert_eq!(prepended, [1, 2, 3, 4, 5]);