Mh this error is really buggy me today,
So I have a function that do not change the content of the array, so I declare it []const u8 but from
another source I generate a vector that can be modified []u8, and I pass this vector to the function
that do not modify the code,
So something like that
fn foo(arr: *[]const u8) {
// write down to the wire
}
fn generate_byte(arr: *[]u8) {
// generate the buffer
}
fn main() {
var buff = ...;
generate_byte(buff);
foo(buff);
}
Can someone help me to clarify this const stuff?