about summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;
             }
         }
     }