aboutsummaryrefslogtreecommitdiff
path: root/src/comptime_string_map.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2023-07-11 19:14:34 -0700
committerGravatar GitHub <noreply@github.com> 2023-07-11 19:14:34 -0700
commitcbb88672f217a90db1aa1eb29cd92d5d9035b22b (patch)
tree43a00501f3cde495967e116f0b660777051551f8 /src/comptime_string_map.zig
parent1f900cff453700b19bca2acadfe26da4468c1282 (diff)
parent34b0e7a2bbd8bf8097341cdb0075d0908283e834 (diff)
downloadbun-jarred/esm-conditions.tar.gz
bun-jarred/esm-conditions.tar.zst
bun-jarred/esm-conditions.zip
Merge branch 'main' into jarred/esm-conditionsjarred/esm-conditions
Diffstat (limited to '')
-rw-r--r--src/comptime_string_map.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/comptime_string_map.zig b/src/comptime_string_map.zig
index e60fcb1cb..87881263b 100644
--- a/src/comptime_string_map.zig
+++ b/src/comptime_string_map.zig
@@ -41,7 +41,7 @@ pub fn ComptimeStringMapWithKeyType(comptime KeyType: type, comptime V: type, co
} else {
@compileError("Not implemented for this key type");
}
- std.sort.sort(KV, &sorted_kvs, {}, lenAsc);
+ std.sort.block(KV, &sorted_kvs, {}, lenAsc);
const min_len = sorted_kvs[0].key.len;
const max_len = sorted_kvs[sorted_kvs.len - 1].key.len;
var len_indexes: [max_len + 1]usize = undefined;
@@ -443,12 +443,12 @@ pub fn compareString(input: []const u8) !void {
if (TestEnum2.map.has(str) != TestEnum2.official.has(str)) {
std.debug.panic("{s} - TestEnum2.map.has(str) ({d}) != TestEnum2.official.has(str) ({d})", .{
str,
- @boolToInt(TestEnum2.map.has(str)),
- @boolToInt(TestEnum2.official.has(str)),
+ @intFromBool(TestEnum2.map.has(str)),
+ @intFromBool(TestEnum2.official.has(str)),
});
}
- std.debug.print("For string: \"{s}\" (has a match? {d})\n", .{ str, @boolToInt(TestEnum2.map.has(str)) });
+ std.debug.print("For string: \"{s}\" (has a match? {d})\n", .{ str, @intFromBool(TestEnum2.map.has(str)) });
var i: usize = 0;
var is_eql = false;