From 4d849825175a06df2a98ffda167e60d6e34435fa Mon Sep 17 00:00:00 2001 From: Takumi Katase Date: Thu, 1 Jan 2026 02:48:51 +0900 Subject: hotfix: replace deprecated std.mem.trimLeft with trimStart for Zig 0.16 Signed-off-by: Takumi Katase --- clap.zig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'clap.zig') diff --git a/clap.zig b/clap.zig index 2345163..38b2c27 100644 --- a/clap.zig +++ b/clap.zig @@ -116,7 +116,7 @@ fn countParams(str: []const u8) usize { var res: usize = 0; var it = std.mem.splitScalar(u8, str, '\n'); while (it.next()) |line| { - const trimmed = std.mem.trimLeft(u8, line, " \t"); + const trimmed = std.mem.trimStart(u8, line, " \t"); if (std.mem.startsWith(u8, trimmed, "-") or std.mem.startsWith(u8, trimmed, "<")) { @@ -1426,7 +1426,7 @@ pub fn help( var res: usize = std.math.maxInt(usize); var it = std.mem.tokenizeScalar(u8, description, '\n'); while (it.next()) |line| : (first_line = false) { - const trimmed = std.mem.trimLeft(u8, line, " "); + const trimmed = std.mem.trimStart(u8, line, " "); const indent = line.len - trimmed.len; // If the first line has no indentation, then we ignore the indentation of the @@ -1460,7 +1460,7 @@ pub fn help( else raw_line[@min(min_description_indent, raw_line.len)..]; - const line = std.mem.trimLeft(u8, indented_line, " "); + const line = std.mem.trimStart(u8, indented_line, " "); if (line.len == 0) { non_emitted_newlines += 1; continue; -- cgit v1.2.3