diff options
| -rw-r--r-- | .github/workflows/main.yml | 4 | ||||
| -rw-r--r-- | build.zig | 2 | ||||
| -rw-r--r-- | clap.zig | 4 | ||||
| -rw-r--r-- | clap/comptime.zig | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1fde407..40fe612 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml | |||
| @@ -12,7 +12,7 @@ jobs: | |||
| 12 | submodules: recursive | 12 | submodules: recursive |
| 13 | - uses: goto-bus-stop/setup-zig@v1.3.0 | 13 | - uses: goto-bus-stop/setup-zig@v1.3.0 |
| 14 | with: | 14 | with: |
| 15 | version: 0.8.0 | 15 | version: master |
| 16 | - run: zig build | 16 | - run: zig build |
| 17 | lint: | 17 | lint: |
| 18 | runs-on: ubuntu-latest | 18 | runs-on: ubuntu-latest |
| @@ -20,5 +20,5 @@ jobs: | |||
| 20 | - uses: actions/checkout@v2.3.4 | 20 | - uses: actions/checkout@v2.3.4 |
| 21 | - uses: goto-bus-stop/setup-zig@v1.3.0 | 21 | - uses: goto-bus-stop/setup-zig@v1.3.0 |
| 22 | with: | 22 | with: |
| 23 | version: 0.8.0 | 23 | version: master |
| 24 | - run: zig fmt --check . | 24 | - run: zig fmt --check . |
| @@ -52,7 +52,7 @@ pub fn build(b: *Builder) void { | |||
| 52 | 52 | ||
| 53 | fn readMeStep(b: *Builder) *std.build.Step { | 53 | fn readMeStep(b: *Builder) *std.build.Step { |
| 54 | const s = b.allocator.create(std.build.Step) catch unreachable; | 54 | const s = b.allocator.create(std.build.Step) catch unreachable; |
| 55 | s.* = std.build.Step.init(.Custom, "ReadMeStep", b.allocator, struct { | 55 | s.* = std.build.Step.init(.custom, "ReadMeStep", b.allocator, struct { |
| 56 | fn make(step: *std.build.Step) anyerror!void { | 56 | fn make(step: *std.build.Step) anyerror!void { |
| 57 | @setEvalBranchQuota(10000); | 57 | @setEvalBranchQuota(10000); |
| 58 | _ = step; | 58 | _ = step; |
| @@ -74,7 +74,7 @@ pub fn parseParam(line: []const u8) !Param(Help) { | |||
| 74 | @setEvalBranchQuota(std.math.maxInt(u32)); | 74 | @setEvalBranchQuota(std.math.maxInt(u32)); |
| 75 | 75 | ||
| 76 | var found_comma = false; | 76 | var found_comma = false; |
| 77 | var it = mem.tokenize(line, " \t"); | 77 | var it = mem.tokenize(u8, line, " \t"); |
| 78 | var param_str = it.next() orelse return error.NoParamFound; | 78 | var param_str = it.next() orelse return error.NoParamFound; |
| 79 | 79 | ||
| 80 | const short_name = if (!mem.startsWith(u8, param_str, "--") and | 80 | const short_name = if (!mem.startsWith(u8, param_str, "--") and |
| @@ -409,7 +409,7 @@ pub fn helpFull( | |||
| 409 | try printParam(cs.writer(), Id, param, Error, context, valueText); | 409 | try printParam(cs.writer(), Id, param, Error, context, valueText); |
| 410 | try stream.writeByteNTimes(' ', max_spacing - @intCast(usize, cs.bytes_written)); | 410 | try stream.writeByteNTimes(' ', max_spacing - @intCast(usize, cs.bytes_written)); |
| 411 | const help_text = try helpText(context, param); | 411 | const help_text = try helpText(context, param); |
| 412 | var help_text_line_it = mem.split(help_text, "\n"); | 412 | var help_text_line_it = mem.split(u8, help_text, "\n"); |
| 413 | var indent_line = false; | 413 | var indent_line = false; |
| 414 | while (help_text_line_it.next()) |line| : (indent_line = true) { | 414 | while (help_text_line_it.next()) |line| : (indent_line = true) { |
| 415 | if (indent_line) { | 415 | if (indent_line) { |
diff --git a/clap/comptime.zig b/clap/comptime.zig index a0f57ad..1050861 100644 --- a/clap/comptime.zig +++ b/clap/comptime.zig | |||
| @@ -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| { |