Hello, I am trying to init an u8 array from a smaller u8 array,
I writing a client for a protocol where there is a header and parameters or values, i need to put everything together in an arrat to write it to the server.Values are u8 and the header is an u8 array like in the code below:
const HEADER: [u8;6] = *b"HEADER";
let value1: u8 = 0;
let value2: u8 = 1;
// this code don't work but is there a way to do this?
let data: [u8;8] = [HEADER, value1, value2]
I could do a for loop over the header and fill the other array but i think it isnt the optimal way so is there a better way?