diff options
author | 2021-06-06 21:16:43 -0700 | |
---|---|---|
committer | 2021-06-06 21:16:43 -0700 | |
commit | 079fe523d4c397c5e4d877cc2faf8d29139e0a07 (patch) | |
tree | 58bea423b5ccde9bb4e6e7aa703e583f2191bd99 /src/string_immutable.zig | |
parent | 13653a93a2a4181fcea35576338fe24f465fc748 (diff) | |
download | bun-079fe523d4c397c5e4d877cc2faf8d29139e0a07.tar.gz bun-079fe523d4c397c5e4d877cc2faf8d29139e0a07.tar.zst bun-079fe523d4c397c5e4d877cc2faf8d29139e0a07.zip |
Upgrade hash table
Former-commit-id: 5d208f9ea0be4e5f2a682f25b0a20a623ce61091
Diffstat (limited to 'src/string_immutable.zig')
-rw-r--r-- | src/string_immutable.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig index 2e07f04ba..c0b72d178 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -97,6 +97,10 @@ pub fn endsWithAnyComptime(self: string, comptime str: string) bool { pub fn eql(self: string, other: anytype) bool { if (self.len != other.len) return false; + if (comptime @TypeOf(other) == *string) { + return eql(self, other.*); + } + for (self) |c, i| { if (other[i] != c) return false; } |