We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d60e6d1 commit 55d6252Copy full SHA for 55d6252
lib/std/static_string_map.zig
@@ -13,7 +13,9 @@ pub fn StaticStringMapIgnoreCase(comptime V: type) type {
13
14
pub fn defaultEql(comptime len: usize, comptime expected: anytype, actual: anytype) bool {
15
comptime assert(std.meta.hasUniqueRepresentation(@TypeOf(expected, actual)));
16
- const Compare = std.meta.Int(.unsigned, len * std.mem.byte_size_in_bits);
+ const T = @typeInfo(@TypeOf(expected)).array.child;
17
+ const child_bytes = std.mem.byte_size_in_bits * @sizeOf(T);
18
+ const Compare = std.meta.Int(.unsigned, len * child_bytes);
19
const a: Compare = @bitCast(expected);
20
const b: Compare = @bitCast(actual);
21
return a == b;
0 commit comments