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

@@ -18,14 +18,14 @@ pub fn main() !void {
a = arena.allocator();
const zig_exe_rel = try (arg_it.next(a) orelse {
const zig_exe_rel = (try arg_it.next(a)) orelse {
std.debug.print("Expected first argument to be path to zig compiler\n", .{});
return error.InvalidArgs;
});
const cache_root = try (arg_it.next(a) orelse {
};
const cache_root = (try arg_it.next(a)) orelse {
std.debug.print("Expected second argument to be cache root directory path\n", .{});
return error.InvalidArgs;
});
};
const zig_exe = try fs.path.resolve(a, &[_][]const u8{zig_exe_rel});
const dir_path = try fs.path.join(a, &[_][]const u8{ cache_root, "clitest" });