Skip to content

Commit

Permalink
Update to latest zig
Browse files Browse the repository at this point in the history
See ziglang/zig#19847

Compatibility with Zig 0.13.0 remains unchanged
  • Loading branch information
Techatrix authored and Hejsil committed Jun 16, 2024
1 parent 7a51c11 commit c0193e9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions clap.zig
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fn countParams(str: []const u8) usize {
@setEvalBranchQuota(std.math.maxInt(u32));

var res: usize = 0;
var it = mem.split(u8, str, "\n");
var it = mem.splitScalar(u8, str, '\n');
while (it.next()) |line| {
const trimmed = mem.trimLeft(u8, line, " \t");
if (mem.startsWith(u8, trimmed, "-") or
Expand Down Expand Up @@ -1170,7 +1170,7 @@ pub fn help(

var first_line = true;
var res: usize = std.math.maxInt(usize);
var it = mem.tokenize(u8, description, "\n");
var it = mem.tokenizeScalar(u8, description, '\n');
while (it.next()) |line| : (first_line = false) {
const trimmed = mem.trimLeft(u8, line, " ");
const indent = line.len - trimmed.len;
Expand All @@ -1195,7 +1195,7 @@ pub fn help(
};

const description = param.id.description();
var it = mem.split(u8, description, "\n");
var it = mem.splitScalar(u8, description, '\n');
var first_line = true;
var non_emitted_newlines: usize = 0;
var last_line_indentation: usize = 0;
Expand Down Expand Up @@ -1242,7 +1242,7 @@ pub fn help(
try description_writer.newline();
}

var words = mem.tokenize(u8, line, " ");
var words = mem.tokenizeScalar(u8, line, ' ');
while (words.next()) |word|
try description_writer.writeWord(word);

Expand Down

0 comments on commit c0193e9

Please sign in to comment.