diff --git a/src/exclude.zig b/src/exclude.zig index 2376640..0c2d4d5 100644 --- a/src/exclude.zig +++ b/src/exclude.zig @@ -55,7 +55,7 @@ const Pattern = struct { } fn parse(pat_: []const u8) *const Pattern { - var pat = std.mem.trimLeft(u8, pat_, "/"); + var pat = std.mem.trimStart(u8, pat_, "/"); const top = main.allocator.create(Pattern) catch unreachable; var tail = top; tail.sub = null; diff --git a/src/util.zig b/src/util.zig index 8a4ce8a..2cdaf8d 100644 --- a/src/util.zig +++ b/src/util.zig @@ -193,7 +193,7 @@ pub fn expanduser(path: []const u8, alloc: std.mem.Allocator, environ_map: *std. break :blk std.mem.span(p); return alloc.dupeZ(u8, path); }; - const home = std.mem.trimRight(u8, home_raw, "/"); + const home = std.mem.trimEnd(u8, home_raw, "/"); if (home.len == 0 and path.len == len) return alloc.dupeZ(u8, "/"); return try std.mem.concatWithSentinel(alloc, u8, &.{ home, path[len..] }, 0);