mirror of
https://github.com/MasterQ32/zig-args.git
synced 2024-05-04 14:41:12 +02:00
Update for multi-for loops
This commit is contained in:
parent
8dca20383c
commit
e0fd4e607a
2
args.zig
2
args.zig
|
@ -172,7 +172,7 @@ fn parseInternal(comptime Generic: type, comptime MaybeVerb: ?type, args_iterato
|
||||||
try arglist.append(try result_arena_allocator.dupeZ(u8, item));
|
try arglist.append(try result_arena_allocator.dupeZ(u8, item));
|
||||||
} else {
|
} else {
|
||||||
var any_shorthands = false;
|
var any_shorthands = false;
|
||||||
for (item[1..]) |char, index| {
|
for (item[1..], 0..) |char, index| {
|
||||||
var option_name = [2]u8{ '-', char };
|
var option_name = [2]u8{ '-', char };
|
||||||
var found = false;
|
var found = false;
|
||||||
if (@hasDecl(Generic, "shorthands")) {
|
if (@hasDecl(Generic, "shorthands")) {
|
||||||
|
|
Loading…
Reference in a new issue