terminal: change mask from u256 to StaticBitSet

This commit is contained in:
Mitchell Hashimoto
2023-11-09 15:14:33 -08:00
parent 171292a063
commit 53a5734d09
3 changed files with 11 additions and 15 deletions

View File

@@ -241,7 +241,8 @@ pub const VTEvent = struct {
try alloc.dupeZ(u8, @tagName(value)),
),
.Union => |u| if (u.tag_type) |Tag| {
.Union => |u| {
const Tag = u.tag_type orelse @compileError("Unions must have a tag");
const tag_name = @tagName(@as(Tag, value));
inline for (u.fields) |field| {
if (std.mem.eql(u8, field.name, tag_name)) {
@@ -256,8 +257,6 @@ pub const VTEvent = struct {
try md.put(key, s);
}
}
} else {
@compileError("Unions must have a tag");
},
else => switch (Value) {