From 4c14bfd5188bb61d7076bc33fccbcc6a5e9dac01 Mon Sep 17 00:00:00 2001 From: Komari Spaghetti Date: Sat, 8 May 2021 18:08:52 +0200 Subject: Modernize codebase * Better naming for variables * Follow naming style of enums * Use `writer()` instead of `outStream()` * Change many initializers to be a one liner * Don't explicitly initialize fields to their default value --- example/simple-error.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example/simple-error.zig') diff --git a/example/simple-error.zig b/example/simple-error.zig index 3c62f0e..c04a9c6 100644 --- a/example/simple-error.zig +++ b/example/simple-error.zig @@ -1,12 +1,12 @@ -const std = @import("std"); const clap = @import("clap"); +const std = @import("std"); pub fn main() !void { const params = comptime [_]clap.Param(clap.Help){ clap.parseParam("-h, --help Display this help and exit.") catch unreachable, }; - var args = try clap.parse(clap.Help, ¶ms, std.heap.direct_allocator, null); + var args = try clap.parse(clap.Help, ¶ms, .{}); defer args.deinit(); _ = args.flag("--helps"); -- cgit v1.2.3