From dc1431c20883677f8176033ed2fb8ee4360a1b8e Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Sat, 9 Nov 2019 13:12:34 +0100 Subject: Breaking: OsIterator will now get the exe on init --- example/comptime-clap.zig | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'example/comptime-clap.zig') diff --git a/example/comptime-clap.zig b/example/comptime-clap.zig index 8e0eb12..4d0ace3 100644 --- a/example/comptime-clap.zig +++ b/example/comptime-clap.zig @@ -18,13 +18,10 @@ pub fn main() !void { // We then initialize an argument iterator. We will use the OsIterator as it nicely // wraps iterating over arguments the most efficient way on each os. - var iter = clap.args.OsIterator.init(allocator); + var iter = try clap.args.OsIterator.init(allocator); defer iter.deinit(); - // Consume the exe arg. - const exe = try iter.next(); - - // Finally we can parse the arguments + // Parse the arguments var args = try clap.ComptimeClap(clap.Help, params).parse(allocator, clap.args.OsIterator, &iter); defer args.deinit(); -- cgit v1.2.3