pub fn concat<const N: usize, const M: usize, T>(
a: [T; N],
b: [T; M],
) -> [T; { _ }]
Expand description
Concatenates the given array a
with the given other array b
. Returns a
new array which contains all elements from a
and b
. No elements are
dropped, copied or cloned.
ยงExample
let arr1 = [1usize, 2, 3, 4, 5];
let arr2 = [6, 7, 8, 9, 10];
let arr = concat(arr1, arr2);
assert_eq!(arr, [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);