Skip to content

Commit

Permalink
chore: update to latest master
Browse files Browse the repository at this point in the history
update to follow latest for loop syntax
  • Loading branch information
paoda authored and Hejsil committed Feb 22, 2023
1 parent 272d8e2 commit 861de65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clap.zig
Expand Up @@ -242,7 +242,7 @@ pub fn parseParamEx(str: []const u8, end: *usize) !Param(Help) {
rest_of_description,
rest_of_description_new_line,
} = .start;
for (str) |c, i| {
for (str, 0..) |c, i| {
errdefer end.* = i;

switch (state) {
Expand Down Expand Up @@ -422,7 +422,7 @@ fn testParseParams(str: []const u8, expected_params: []const Param(Help)) !void
defer testing.allocator.free(actual_params);

try testing.expectEqual(expected_params.len, actual_params.len);
for (expected_params) |_, i|
for (expected_params, 0..) |_, i|
try expectParam(expected_params[i], actual_params[i]);
}

Expand Down

0 comments on commit 861de65

Please sign in to comment.