Commit 908c2c902a

Andrew Kelley <andrew@ziglang.org>
2024-07-05 21:23:54
std.Build.Cache.Path: add eql method
1 parent ca752c6
Changed files (1)
lib
std
Build
Cache
lib/std/Build/Cache/Path.zig
@@ -147,6 +147,10 @@ pub fn format(
     }
 }
 
+pub fn eql(self: Path, other: Path) bool {
+    return self.root_dir.eql(other.root_dir) and std.mem.eql(u8, self.sub_path, other.sub_path);
+}
+
 const Path = @This();
 const std = @import("../../std.zig");
 const fs = std.fs;