diff options
author | makefunstuff <[email protected]> | 2024-07-03 01:59:38 +0200 |
---|---|---|
committer | makefunstuff <[email protected]> | 2024-07-03 01:59:38 +0200 |
commit | 78495c88705f9d01b342a6ea8218c050fc67d877 (patch) | |
tree | fcd1dc2ef5610244fe40dbb273b417c46f343d3b | |
parent | 389197eef38182b3610a881399d9d04c6cf59f72 (diff) | |
download | tinkerbunk-78495c88705f9d01b342a6ea8218c050fc67d877.tar.gz |
fixed
Diffstat (limited to '')
-rw-r--r-- | src/main.zig | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/main.zig b/src/main.zig index 653dd3b..750dce0 100644 --- a/src/main.zig +++ b/src/main.zig @@ -27,11 +27,9 @@ const Arg = struct { command: Command = undefined, fn parse(self: *Self) !void { - inline for (commands) |command| { - if (std.mem.eql(u8, command.name, self.name)) { - self.command = command.command; - } else { - return error.CommandNotFound; + inline for (commands) |cmd| { + if (std.mem.eql(u8, cmd.name, self.name)) { + self.command = cmd.command; } } } |