aboutsummaryrefslogtreecommitdiff
path: root/src/Cache.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cache.zig')
-rw-r--r--src/Cache.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Cache.zig b/src/Cache.zig
index cfcbc3e76a..425c6407a3 100644
--- a/src/Cache.zig
+++ b/src/Cache.zig
@@ -76,6 +76,14 @@ pub const HashHelper = struct {
for (list_of_bytes) |bytes| hh.addBytes(bytes);
}
+ pub fn addStringSet(hh: *HashHelper, hm: std.StringArrayHashMapUnmanaged(void)) void {
+ const entries = hm.items();
+ hh.add(entries.len);
+ for (entries) |entry| {
+ hh.addBytes(entry.key);
+ }
+ }
+
/// Convert the input value into bytes and record it as a dependency of the process being cached.
pub fn add(hh: *HashHelper, x: anytype) void {
switch (@TypeOf(x)) {