~gpanders/wk

73322f110c4e66c266de6e05eb54f8ac4c53c2b0 — Greg Anders 8 months ago 8c9f00f
Unroll printUsage loop at compile time
1 files changed, 1 insertions(+), 1 deletions(-)

M src/main.zig
M src/main.zig => src/main.zig +1 -1
@@ 10,7 10,7 @@ fn printUsage(exe: []const u8) void {
    stdout.print("Usage: {} COMMAND\n", .{std.fs.path.basename(exe)}) catch unreachable;
    stdout.print("\n", .{}) catch unreachable;
    stdout.print("Available commands:\n", .{}) catch unreachable;
    for (cmd.Commands) |command| {
    inline for (cmd.Commands) |command| {
        stdout.print("\t{}\n", .{command.usage()}) catch unreachable;
    }
}