Skip to content

Commit

Permalink
share/build_runners/live.zig: update to 0.14.0-dev.2509+0c457fa7e
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Joldasov <[email protected]>
  • Loading branch information
BratishkaErik committed Dec 17, 2024
1 parent 122d393 commit 5ed833b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions share/build_runners/live.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1487,20 +1487,20 @@ fn usage(b: *std.Build, out_stream: anytype) !void {
);
}

fn nextArg(args: [][:0]const u8, idx: *usize) ?[:0]const u8 {
fn nextArg(args: []const [:0]const u8, idx: *usize) ?[:0]const u8 {
if (idx.* >= args.len) return null;
defer idx.* += 1;
return args[idx.*];
}

fn nextArgOrFatal(args: [][:0]const u8, idx: *usize) [:0]const u8 {
fn nextArgOrFatal(args: []const [:0]const u8, idx: *usize) [:0]const u8 {
return nextArg(args, idx) orelse {
std.debug.print("expected argument after '{s}'\n access the help menu with 'zig build -h'\n", .{args[idx.* - 1]});
process.exit(1);
};
}

fn argsRest(args: [][:0]const u8, idx: usize) ?[][:0]const u8 {
fn argsRest(args: []const [:0]const u8, idx: usize) ?[]const [:0]const u8 {
if (idx >= args.len) return null;
return args[idx..];
}
Expand Down

0 comments on commit 5ed833b

Please sign in to comment.