diff options
Diffstat (limited to 'example/simple-ex.zig')
| -rw-r--r-- | example/simple-ex.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/example/simple-ex.zig b/example/simple-ex.zig index f504d63..f08751b 100644 --- a/example/simple-ex.zig +++ b/example/simple-ex.zig | |||
| @@ -2,6 +2,7 @@ const clap = @import("clap"); | |||
| 2 | const std = @import("std"); | 2 | const std = @import("std"); |
| 3 | 3 | ||
| 4 | const debug = std.debug; | 4 | const debug = std.debug; |
| 5 | const io = std.io; | ||
| 5 | 6 | ||
| 6 | pub fn main() !void { | 7 | pub fn main() !void { |
| 7 | const allocator = std.heap.page_allocator; | 8 | const allocator = std.heap.page_allocator; |
| @@ -29,7 +30,7 @@ pub fn main() !void { | |||
| 29 | .diagnostic = &diag, | 30 | .diagnostic = &diag, |
| 30 | }) catch |err| { | 31 | }) catch |err| { |
| 31 | // Report useful error and exit | 32 | // Report useful error and exit |
| 32 | diag.report(std.io.getStdErr().outStream(), err) catch {}; | 33 | diag.report(io.getStdErr().writer(), err) catch {}; |
| 33 | return err; | 34 | return err; |
| 34 | }; | 35 | }; |
| 35 | defer args.deinit(); | 36 | defer args.deinit(); |