so my problem is that in the latest dev release at the time of writing, 0.12.0-dev.47+0461a64a9
zig fmt
formats unions in a way that is really annoying to read
this is how unions get formatted on my computer
const UnionExample = union(enum) { field1, field2, field3: Type };
while the much more readable option would be
const UnionExample = union(enum) {
field1,
field2,
field3: Type
};
is there a reason this is the case? because doing it like the second example would be much more friendly to look at.
the second example is also the case for untagged unions, but not for enums, or anything else that has multiple items in it, like functions, enums, structs, or everything else, so this could also help code consistency.