Update comptime_string_map.zig

This commit is contained in:
Jarred Sumner
2022-04-11 01:44:25 -07:00
parent c6393bcd27
commit ac3835227e

View File

@@ -85,6 +85,8 @@ pub fn ComptimeStringMapWithKeyType(comptime KeyType: type, comptime V: type, co
comptime var i = len_indexes[len];
// This benchmarked faster for both small and large lists of strings than using a big switch statement
// But only so long as the keys are a sorted list.
inline while (i < end) : (i += 1) {
if (strings.eqlComptimeCheckLenWithType(KeyType, str, kvs[i].key, false)) {
return kvs[i].value;