diff options
| author | 2023-02-21 19:34:54 -0600 | |
|---|---|---|
| committer | 2023-02-22 09:38:00 +0100 | |
| commit | 861de651f3e1314973b1273ac7856e96b2625ff3 (patch) | |
| tree | 3ed6cb13c3f7268bc43a41a2dbd9bb7536792d1f /clap.zig | |
| parent | ci: Rename release to optimize (diff) | |
| download | zig-clap-861de651f3e1314973b1273ac7856e96b2625ff3.tar.gz zig-clap-861de651f3e1314973b1273ac7856e96b2625ff3.tar.xz zig-clap-861de651f3e1314973b1273ac7856e96b2625ff3.zip | |
chore: update to latest master
update to follow latest for loop syntax
Diffstat (limited to '')
| -rw-r--r-- | clap.zig | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -242,7 +242,7 @@ pub fn parseParamEx(str: []const u8, end: *usize) !Param(Help) { | |||
| 242 | rest_of_description, | 242 | rest_of_description, |
| 243 | rest_of_description_new_line, | 243 | rest_of_description_new_line, |
| 244 | } = .start; | 244 | } = .start; |
| 245 | for (str) |c, i| { | 245 | for (str, 0..) |c, i| { |
| 246 | errdefer end.* = i; | 246 | errdefer end.* = i; |
| 247 | 247 | ||
| 248 | switch (state) { | 248 | switch (state) { |
| @@ -422,7 +422,7 @@ fn testParseParams(str: []const u8, expected_params: []const Param(Help)) !void | |||
| 422 | defer testing.allocator.free(actual_params); | 422 | defer testing.allocator.free(actual_params); |
| 423 | 423 | ||
| 424 | try testing.expectEqual(expected_params.len, actual_params.len); | 424 | try testing.expectEqual(expected_params.len, actual_params.len); |
| 425 | for (expected_params) |_, i| | 425 | for (expected_params, 0..) |_, i| |
| 426 | try expectParam(expected_params[i], actual_params[i]); | 426 | try expectParam(expected_params[i], actual_params[i]); |
| 427 | } | 427 | } |
| 428 | 428 | ||