Function pop_left
Source pub fn pop_left<const N: usize, T>(a: [T; N]) -> ([T; { _ }], T)
Expand description
Identical to pop_right
, but pops from the left of the array instead.
ยงExample
let arr = [1usize, 2, 3, 4, 5];
let (arr, start) = pop_left(arr);
assert_eq!(arr, [2, 3, 4, 5]);
assert_eq!(start, 1);