diff options
Diffstat (limited to 'example/streaming-clap.zig')
| -rw-r--r-- | example/streaming-clap.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/example/streaming-clap.zig b/example/streaming-clap.zig index 2a20bcb..054c401 100644 --- a/example/streaming-clap.zig +++ b/example/streaming-clap.zig | |||
| @@ -18,7 +18,7 @@ pub fn main() !void { | |||
| 18 | var iter = try std.process.ArgIterator.initWithAllocator(allocator); | 18 | var iter = try std.process.ArgIterator.initWithAllocator(allocator); |
| 19 | defer iter.deinit(); | 19 | defer iter.deinit(); |
| 20 | 20 | ||
| 21 | // Skip exe argument | 21 | // Skip exe argument. |
| 22 | _ = iter.next(); | 22 | _ = iter.next(); |
| 23 | 23 | ||
| 24 | // Initialize our diagnostics, which can be used for reporting useful errors. | 24 | // Initialize our diagnostics, which can be used for reporting useful errors. |
| @@ -33,7 +33,7 @@ pub fn main() !void { | |||
| 33 | 33 | ||
| 34 | // Because we use a streaming parser, we have to consume each argument parsed individually. | 34 | // Because we use a streaming parser, we have to consume each argument parsed individually. |
| 35 | while (parser.next() catch |err| { | 35 | while (parser.next() catch |err| { |
| 36 | // Report useful error and exit | 36 | // Report useful error and exit. |
| 37 | diag.report(std.io.getStdErr().writer(), err) catch {}; | 37 | diag.report(std.io.getStdErr().writer(), err) catch {}; |
| 38 | return err; | 38 | return err; |
| 39 | }) |arg| { | 39 | }) |arg| { |