We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d7c59fd commit 42e252dCopy full SHA for 42e252d
lib/std/Build/Cache/Path.zig
@@ -183,7 +183,11 @@ pub const TableAdapter = struct {
183
184
pub fn hash(self: TableAdapter, a: Cache.Path) u32 {
185
_ = self;
186
- const seed: u32 = @bitCast(a.root_dir.handle.fd);
+ 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
+ };
191
return @truncate(Hash.hash(seed, a.sub_path));
192
}
193
pub fn eql(self: TableAdapter, a: Cache.Path, b: Cache.Path, b_index: usize) bool {
0 commit comments