╭ changed ──────╮ │src/command.zig│ ╰───────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │29 pub fn printHelp(cmd_kind_maybe: ?CommandKind, writer: *std.Io.Writer) !void { │ │30 const print_indent = comptime blk: { │ │31 var indent = 0; │ │32 - for (0..@typeInfo(CommandKind).@"enum".fields.len) |i| { │ │33 - indent = @max(commandHelp(@enumFromInt(i)).name.len, indent); │ │32 + for (0..@typeInfo(CommandKind).@"enum".field_names.len) |i| { │ │33 + indent = @max(commandHelp(@fromBackingInt(@intCast(i))).name.len, indent);│ │34 } │ │35 indent += 2; │ │36 break :blk indent; │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │56 } │ │57 } else { │ │58 try writer.print("help: haxy <command> [<args>]\n\n", .{}); │ │59 - inline for (@typeInfo(CommandKind).@"enum".fields) |field| { │ │60 - const help = commandHelp(@enumFromInt(field.value)); │ │59 + inline for (@typeInfo(CommandKind).@"enum".field_values) |value| { │ │60 + const help = commandHelp(@fromBackingInt(@intCast(value))); │ │61 // name and description │ │62 try writer.print("{s}", .{help.name}); │ │63 for (0..print_indent - help.name.len) |_| try writer.print(" ", .{});│ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │139 const command_name = args_slice[0]; │ │140 const extra_args = args_slice[1..]; │ │141 │ │142 - const command_kind: ?CommandKind = inline for (0..@typeInfo(CommandKind).@"enum".fields.len) |i| { │ │143 - if (std.mem.eql(u8, command_name, commandHelp(@enumFromInt(i)).name)) { │ │144 - break @enumFromInt(i); │ │142 + const command_kind: ?CommandKind = inline for (0..@typeInfo(CommandKind).@"enum".field_names.len) |i| {│ │143 + if (std.mem.eql(u8, command_name, commandHelp(@fromBackingInt(@intCast(i))).name)) { │ │144 + break @fromBackingInt(@intCast(i)); │ │145 } │ │146 } else null; │ │147 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯