#std.EnumMap(Enum, Struct), value can be null even though not marked as optional
1 messages · Page 1 of 1 (latest)
are you referencing that code anywhere? its not valid
the whole point of EnumMap is for the index to be an enum, you cant use a u8
regardless though, null is valid there, its just have the init function is done
because the list youre giving to init is not accepting the type you used directly
it wraps it in an optional
std.EnumMap(Enum, Struct), value can be null even though not marked as optional
i dont see how this is hidden behavior its a function doing stuff
its so you can leave a field uninitialized
imo the more "hidden behavior" is that you can omit the field entirely
You want EnumArray