From 0f496af7e92959d7e5002812dde42ee7accd04f8 Mon Sep 17 00:00:00 2001 From: Robin Voetter Date: Wed, 2 Feb 2022 17:09:11 +0100 Subject: [PATCH] Adapt to new ArgsIterator api --- generator/main.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/generator/main.zig b/generator/main.zig index ff16e11..c1cc52b 100644 --- a/generator/main.zig +++ b/generator/main.zig @@ -10,13 +10,13 @@ pub fn main() !void { defer arena.deinit(); const allocator = arena.allocator(); - var args = std.process.args(); - const prog_name = (try args.next(allocator)) orelse return error.ExecutableNameMissing; + var args = try std.process.argsWithAllocator(allocator); + const prog_name = args.next() orelse return error.ExecutableNameMissing; var maybe_xml_path: ?[]const u8 = null; var maybe_out_path: ?[]const u8 = null; - while (try args.next(allocator)) |arg| { + while (args.next()) |arg| { if (std.mem.eql(u8, arg, "--help") or std.mem.eql(u8, arg, "-h")) { @setEvalBranchQuota(2000); try stderr.writer().print(