| ... | @@ -41,7 +41,7 @@ fn clean(out: anytype, n: usize) !void { | ... | @@ -41,7 +41,7 @@ fn clean(out: anytype, n: usize) !void { |
| 41 | } | 41 | } |
| 42 | | 42 | |
| 43 | pub fn forEnum(out: anytype, in: anytype, comptime prompt: []const u8, alloc: std.mem.Allocator, comptime E: type, default: ?E) !E { | 43 | pub fn forEnum(out: anytype, in: anytype, comptime prompt: []const u8, alloc: std.mem.Allocator, comptime E: type, default: ?E) !E { |
| 44 | comptime std.debug.assert(@typeInfo(E) == .Enum); | 44 | comptime std.debug.assert(@typeInfo(E) == .@"enum"); |
| 45 | const def: ?[]const u8 = if (default) |d| @tagName(d) else null; | 45 | const def: ?[]const u8 = if (default) |d| @tagName(d) else null; |
| 46 | | 46 | |
| 47 | try out.print(comptime ansi.color.Fg(.Green, "? "), .{}); | 47 | try out.print(comptime ansi.color.Fg(.Green, "? "), .{}); |