aztec-nr - protocol_types::utils::arrays

Function array_merge

pub fn array_merge<T, let N: u32>(array1: [T; N], array2: [T; N]) -> [T; N]
where T: Empty

This function assumes that array1 and array2 contain no more than N non-empty elements between them, if this is not the case then elements from the end of array2 will be dropped. Danger: This is only safe to call if the input arrays have been "validated" (dense lhs, empty rhs).