1 messages · Page 1 of 1 (latest)
I have 2 questions, whats the best way to store a constant value thats an array?
second question being can i initialise an array and make it a slice in the same line:
pub const PREFIX: []u8 = [_]u8{1}[0..];
1: i dont quite get what you mean by "store" but if it's const then just wherever you need it should be fine.
2: pub const PREFIX: []const u8 = &.{ 1, 2, 3 };