diff options
Diffstat (limited to 'clap/comptime.zig')
| -rw-r--r-- | clap/comptime.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clap/comptime.zig b/clap/comptime.zig index a0f57ad..b440004 100644 --- a/clap/comptime.zig +++ b/clap/comptime.zig | |||
| @@ -41,7 +41,7 @@ pub fn ComptimeClap( | |||
| 41 | single_options_is_set: std.PackedIntArray(u1, single_options), | 41 | single_options_is_set: std.PackedIntArray(u1, single_options), |
| 42 | flags: std.PackedIntArray(u1, flags), | 42 | flags: std.PackedIntArray(u1, flags), |
| 43 | pos: []const []const u8, | 43 | pos: []const []const u8, |
| 44 | allocator: *mem.Allocator, | 44 | allocator: mem.Allocator, |
| 45 | 45 | ||
| 46 | pub fn parse(iter: anytype, opt: clap.ParseOptions) !@This() { | 46 | pub fn parse(iter: anytype, opt: clap.ParseOptions) !@This() { |
| 47 | const allocator = opt.allocator; | 47 | const allocator = opt.allocator; |
| @@ -82,8 +82,8 @@ pub fn ComptimeClap( | |||
| 82 | if (multis.len != 0) | 82 | if (multis.len != 0) |
| 83 | try multis[param.id].append(arg.value.?); | 83 | try multis[param.id].append(arg.value.?); |
| 84 | } else { | 84 | } else { |
| 85 | debug.assert(res.flags.len() != 0); | 85 | debug.assert(res.flags.len != 0); |
| 86 | if (res.flags.len() != 0) | 86 | if (res.flags.len != 0) |
| 87 | res.flags.set(param.id, 1); | 87 | res.flags.set(param.id, 1); |
| 88 | } | 88 | } |
| 89 | } | 89 | } |
| @@ -195,7 +195,7 @@ fn testErr( | |||
| 195 | ) !void { | 195 | ) !void { |
| 196 | var diag = clap.Diagnostic{}; | 196 | var diag = clap.Diagnostic{}; |
| 197 | var iter = clap.args.SliceIterator{ .args = args_strings }; | 197 | var iter = clap.args.SliceIterator{ .args = args_strings }; |
| 198 | var args = clap.parseEx(u8, params, &iter, .{ | 198 | _ = clap.parseEx(u8, params, &iter, .{ |
| 199 | .allocator = testing.allocator, | 199 | .allocator = testing.allocator, |
| 200 | .diagnostic = &diag, | 200 | .diagnostic = &diag, |
| 201 | }) catch |err| { | 201 | }) catch |err| { |