From 397e47c274fb5077e16b37f28c8f9327cc995b2e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Sat, 27 Sep 2025 14:32:45 -0700 Subject: terminal: use LibEnum for the command keys --- src/lib/enum.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/enum.zig b/src/lib/enum.zig index 01006f46f..063232176 100644 --- a/src/lib/enum.zig +++ b/src/lib/enum.zig @@ -35,7 +35,8 @@ pub fn Enum( fields_i += 1; } - return @Type(.{ .@"enum" = .{ + // Assigned to var so that the type name is nicer in stack traces. + const Result = @Type(.{ .@"enum" = .{ .tag_type = switch (target) { .c => c_int, .zig => std.math.IntFittingRange(0, fields_i - 1), @@ -44,6 +45,7 @@ pub fn Enum( .decls = &.{}, .is_exhaustive = true, } }); + return Result; } pub const Target = union(enum) { -- cgit v1.2.3