summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMitchell Hashimoto <m@mitchellh.com>2025-09-27 14:32:45 -0700
committerMitchell Hashimoto <m@mitchellh.com>2025-09-27 14:32:49 -0700
commit397e47c274fb5077e16b37f28c8f9327cc995b2e (patch)
tree0bbf858d2c5e01d794e88d6ee310eb743de1d7ed /src/lib
parenta79e68ace105815f45a52ee0b4ff03bf5558fa0b (diff)
terminal: use LibEnum for the command keys
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/enum.zig4
1 files changed, 3 insertions, 1 deletions
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) {