diff options
| author | 2019-08-06 18:38:56 +0200 | |
|---|---|---|
| committer | 2019-08-06 18:38:56 +0200 | |
| commit | bf18f2a1f72570aca94a6d3e4703f5f54a2e090b (patch) | |
| tree | d06d34639f8d8d69830719be22d7c79d6875814a /example/comptime-clap.zig | |
| parent | Embed examples in README during build (diff) | |
| download | zig-clap-bf18f2a1f72570aca94a6d3e4703f5f54a2e090b.tar.gz zig-clap-bf18f2a1f72570aca94a6d3e4703f5f54a2e090b.tar.xz zig-clap-bf18f2a1f72570aca94a6d3e4703f5f54a2e090b.zip | |
build with latest version of zig
Diffstat (limited to '')
| -rw-r--r-- | example/comptime-clap.zig | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/example/comptime-clap.zig b/example/comptime-clap.zig index 695fa62..0b6d2c4 100644 --- a/example/comptime-clap.zig +++ b/example/comptime-clap.zig | |||
| @@ -4,13 +4,7 @@ const clap = @import("clap"); | |||
| 4 | const debug = std.debug; | 4 | const debug = std.debug; |
| 5 | 5 | ||
| 6 | pub fn main() !void { | 6 | pub fn main() !void { |
| 7 | const stdout_file = try std.io.getStdOut(); | 7 | const allocator = std.heap.direct_allocator; |
| 8 | var stdout_out_stream = stdout_file.outStream(); | ||
| 9 | const stdout = &stdout_out_stream.stream; | ||
| 10 | |||
| 11 | var direct_allocator = std.heap.DirectAllocator.init(); | ||
| 12 | const allocator = &direct_allocator.allocator; | ||
| 13 | defer direct_allocator.deinit(); | ||
| 14 | 8 | ||
| 15 | // First we specify what parameters our program can take. | 9 | // First we specify what parameters our program can take. |
| 16 | const params = [_]clap.Param([]const u8){ | 10 | const params = [_]clap.Param([]const u8){ |