From b34ab64c2513102ce95ede5c9db33f0c465465f1 Mon Sep 17 00:00:00 2001 From: Jimmi Holst Christensen Date: Mon, 29 Nov 2021 16:55:32 +0100 Subject: Fix chaining typo fixes #58 --- clap/streaming.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clap/streaming.zig') diff --git a/clap/streaming.zig b/clap/streaming.zig index 885c581..3f24aaa 100644 --- a/clap/streaming.zig +++ b/clap/streaming.zig @@ -46,7 +46,7 @@ pub fn StreamingClap(comptime Id: type, comptime ArgIterator: type) type { pub fn next(parser: *@This()) !?Arg(Id) { switch (parser.state) { .normal => return try parser.normal(), - .chaining => |state| return try parser.chainging(state), + .chaining => |state| return try parser.chaining(state), .rest_are_positional => { const param = parser.positionalParam() orelse unreachable; const value = (try parser.iter.next()) orelse return null; @@ -89,7 +89,7 @@ pub fn StreamingClap(comptime Id: type, comptime ArgIterator: type) type { return parser.err(arg, .{ .long = name }, error.InvalidArgument); }, - .short => return try parser.chainging(.{ + .short => return try parser.chaining(.{ .arg = arg, .index = 0, }), @@ -110,7 +110,7 @@ pub fn StreamingClap(comptime Id: type, comptime ArgIterator: type) type { } } - fn chainging(parser: *@This(), state: State.Chaining) !?Arg(Id) { + fn chaining(parser: *@This(), state: State.Chaining) !?Arg(Id) { const arg = state.arg; const index = state.index; const next_index = index + 1; -- cgit v1.2.3