about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authormakefunstuff <[email protected]>2024-07-03 01:59:38 +0200
committermakefunstuff <[email protected]>2024-07-03 01:59:38 +0200
commit78495c88705f9d01b342a6ea8218c050fc67d877 (patch)
treefcd1dc2ef5610244fe40dbb273b417c46f343d3b /src
parent389197eef38182b3610a881399d9d04c6cf59f72 (diff)
downloadtinkerbunk-78495c88705f9d01b342a6ea8218c050fc67d877.tar.gz
fixed
Diffstat (limited to 'src')
-rw-r--r--src/main.zig8
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;
             }
         }
     }