aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorominitay <37453713+ominitay@users.noreply.github.com>2021-12-19 22:06:43 +0000
committerAndrew Kelley <andrew@ziglang.org>2021-12-21 11:15:33 -0800
commit7e16bb36d82cf45cd5f6f4da38fba512554f66ed (patch)
tree72a943205528ec58a80d6939670cb3b2a1695fe0 /doc
parent0d09b87c1409660a9d541e7f2972480b4be137a5 (diff)
downloadzig-7e16bb36d82cf45cd5f6f4da38fba512554f66ed.tar.gz
zig-7e16bb36d82cf45cd5f6f4da38fba512554f66ed.zip
Change `ArgIterator.next()` return type
Changes the return type of `ArgIterator.next()` from `?(NextError![:0]u8)` to `NextError!?[:0]u8`.
Diffstat (limited to 'doc')
-rw-r--r--doc/docgen.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/docgen.zig b/doc/docgen.zig
index 0afb723e57..aed546680b 100644
--- a/doc/docgen.zig
+++ b/doc/docgen.zig
@@ -27,18 +27,18 @@ pub fn main() !void {
if (!args_it.skip()) @panic("expected self arg");
- const zig_exe = try (args_it.next(allocator) orelse @panic("expected zig exe arg"));
+ const zig_exe = (try args_it.next(allocator)) orelse @panic("expected zig exe arg");
defer allocator.free(zig_exe);
- const in_file_name = try (args_it.next(allocator) orelse @panic("expected input arg"));
+ const in_file_name = (try args_it.next(allocator)) orelse @panic("expected input arg");
defer allocator.free(in_file_name);
- const out_file_name = try (args_it.next(allocator) orelse @panic("expected output arg"));
+ const out_file_name = (try args_it.next(allocator)) orelse @panic("expected output arg");
defer allocator.free(out_file_name);
var do_code_tests = true;
- if (args_it.next(allocator)) |arg| {
- if (mem.eql(u8, try arg, "--skip-code-tests")) {
+ if (try args_it.next(allocator)) |arg| {
+ if (mem.eql(u8, arg, "--skip-code-tests")) {
do_code_tests = false;
} else {
@panic("unrecognized arg");