Change ArgIterator.next() return type

Changes the return type of `ArgIterator.next()` from
`?(NextError![:0]u8)` to `NextError!?[:0]u8`.
This commit is contained in:
ominitay
2021-12-19 22:06:43 +00:00
committed by Andrew Kelley
parent 0d09b87c14
commit 7e16bb36d8
4 changed files with 20 additions and 23 deletions

View File

@@ -362,8 +362,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
\\ const stdout = io.getStdOut().writer();
\\ var index: usize = 0;
\\ _ = args_it.skip();
\\ while (args_it.next(allocator)) |arg_or_err| : (index += 1) {
\\ const arg = try arg_or_err;
\\ while (try args_it.next(allocator)) |arg| : (index += 1) {
\\ try stdout.print("{}: {s}\n", .{index, arg});
\\ }
\\}
@@ -401,8 +400,7 @@ pub fn addCases(cases: *tests.CompareOutputContext) void {
\\ const stdout = io.getStdOut().writer();
\\ var index: usize = 0;
\\ _ = args_it.skip();
\\ while (args_it.next(allocator)) |arg_or_err| : (index += 1) {
\\ const arg = try arg_or_err;
\\ while (try args_it.next(allocator)) |arg| : (index += 1) {
\\ try stdout.print("{}: {s}\n", .{index, arg});
\\ }
\\}