From 78495c88705f9d01b342a6ea8218c050fc67d877 Mon Sep 17 00:00:00 2001 From: makefunstuff Date: Wed, 3 Jul 2024 02:59:38 +0300 Subject: fixed --- src/main.zig | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src') 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; } } } -- cgit 1.4.1-2-gfad0