diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2024-07-05 12:23:54 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2024-07-12 00:14:07 -0700 |
| commit | 908c2c902ada674eae30d81a8fb5b6c43cdfe141 (patch) | |
| tree | d9a5e47cbd05ff491af56e75577d928be9de4716 /lib/std/Build/Cache | |
| parent | ca752c61c08eaa06458bdc6fa3cc724c09a62f77 (diff) | |
| download | zig-908c2c902ada674eae30d81a8fb5b6c43cdfe141.tar.gz zig-908c2c902ada674eae30d81a8fb5b6c43cdfe141.zip | |
std.Build.Cache.Path: add eql method
Diffstat (limited to 'lib/std/Build/Cache')
| -rw-r--r-- | lib/std/Build/Cache/Path.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/Build/Cache/Path.zig b/lib/std/Build/Cache/Path.zig index 48bb8c32be..cb6e4c7087 100644 --- a/lib/std/Build/Cache/Path.zig +++ b/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; |
