pub fn hash(self: TableAdapter, a: Cache.Path) u32 self: TableAdaptera: Cache.Path223
224
225
226
227
228
229
230
231 pub fn hash(self: TableAdapter, a: Cache.Path) u32 {
_ = self;
const seed = switch (@typeInfo(@TypeOf(a.root_dir.handle.handle))) {
.pointer => @intFromPtr(a.root_dir.handle.handle),
.int => @as(u32, @bitCast(a.root_dir.handle.handle)),
else => @compileError("unimplemented hash function"),
};
return @truncate(Hash.hash(seed, a.sub_path));
}