| ... | ... | @@ -183,7 +183,11 @@ pub const TableAdapter = struct { |
| 183 | 183 | |
| 184 | 184 | pub fn hash(self: TableAdapter, a: Cache.Path) u32 { |
| 185 | 185 | _ = self; |
| 186 | | const seed: u32 = @bitCast(a.root_dir.handle.fd); |
| 186 | const seed = switch (@typeInfo(@TypeOf(a.root_dir.handle.fd))) { |
| 187 | .Pointer => @intFromPtr(a.root_dir.handle.fd), |
| 188 | .Int => @as(u32, @bitCast(a.root_dir.handle.fd)), |
| 189 | else => @compileError("unimplemented hash function"), |
| 190 | }; |
| 187 | 191 | return @truncate(Hash.hash(seed, a.sub_path)); |
| 188 | 192 | } |
| 189 | 193 | pub fn eql(self: TableAdapter, a: Cache.Path, b: Cache.Path, b_index: usize) bool { |