diff options
author | 2021-09-21 23:28:05 -0700 | |
---|---|---|
committer | 2021-09-21 23:28:05 -0700 | |
commit | 2326a1e1050d19a9b958893f07414f89e42dc82c (patch) | |
tree | 892809b17cae860c79ed73179c6e0334aa4015d3 /src/string_immutable.zig | |
parent | c4dc6d9bfffd0a6117a290e94725ee862edbd09f (diff) | |
download | bun-2326a1e1050d19a9b958893f07414f89e42dc82c.tar.gz bun-2326a1e1050d19a9b958893f07414f89e42dc82c.tar.zst bun-2326a1e1050d19a9b958893f07414f89e42dc82c.zip |
Fix the compiler errors
Diffstat (limited to '')
-rw-r--r-- | src/string_immutable.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/string_immutable.zig b/src/string_immutable.zig index 4bfc707b7..1a144a747 100644 --- a/src/string_immutable.zig +++ b/src/string_immutable.zig @@ -39,7 +39,7 @@ pub inline fn indexOfChar(self: string, char: u8) ?usize { pub fn indexOfCharNeg(self: string, char: u8) i32 { var i: u32 = 0; while (i < self.len) : (i += 1) { - if (self[i] == value) return @intCast(i32, i); + if (self[i] == char) return @intCast(i32, i); } return -1; } @@ -271,7 +271,7 @@ pub fn quotedAlloc(allocator: *std.mem.Allocator, self: string) !string { pub fn endsWithAnyComptime(self: string, comptime str: string) bool { if (comptime str.len < 10) { const last = self[self.len - 1]; - inline while (str) |char| { + inline for (str) |char| { if (char == last) { return true; } |