From 908c2c902ada674eae30d81a8fb5b6c43cdfe141 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 5 Jul 2024 12:23:54 -0700 Subject: [PATCH] std.Build.Cache.Path: add eql method --- lib/std/Build/Cache/Path.zig | 4 ++++ 1 file changed, 4 insertions(+) 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;