diff options
author | 2023-02-23 23:57:19 -0800 | |
---|---|---|
committer | 2023-02-23 23:57:19 -0800 | |
commit | 3f04f8d0a653cf5decef2225c2044742b382718a (patch) | |
tree | 91eb6500834e3157ecb9ab208101aa368a1191c8 /src/bunfig.zig | |
parent | b5bdde28ed34070cbb1d34d13f414f4c513ee40d (diff) | |
download | bun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.gz bun-3f04f8d0a653cf5decef2225c2044742b382718a.tar.zst bun-3f04f8d0a653cf5decef2225c2044742b382718a.zip |
Upgrade Zig (#2151)
* fixup
* Upgrade Zig
* Remove bad assertion
* strings
* bump
* mode -> optimize
* optimize
* Linux build
* Update bindgen.zig
Diffstat (limited to 'src/bunfig.zig')
-rw-r--r-- | src/bunfig.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bunfig.zig b/src/bunfig.zig index 5f9e1728c..4a341ef20 100644 --- a/src/bunfig.zig +++ b/src/bunfig.zig @@ -256,7 +256,7 @@ pub const Bunfig = struct { if (name_.len == 0) continue; const name = if (name_[0] == '@') name_[1..] else name_; var index = names.items.len; - for (names.items) |comparator, i| { + for (names.items, 0..) |comparator, i| { if (strings.eql(name, comparator)) { index = i; break; @@ -417,7 +417,7 @@ pub const Bunfig = struct { try this.expect(entryPoints, .e_array); const items = entryPoints.data.e_array.items.slice(); var names = try this.allocator.alloc(string, items.len); - for (items) |item, i| { + for (items, 0..) |item, i| { try this.expect(item, .e_string); names[i] = try item.data.e_string.string(allocator); } @@ -560,7 +560,7 @@ pub const Bunfig = struct { .e_array => |array| { var externals = try allocator.alloc(string, array.items.len); - for (array.items.slice()) |item, i| { + for (array.items.slice(), 0..) |item, i| { try this.expect(item, .e_string); externals[i] = try item.data.e_string.string(allocator); } @@ -584,7 +584,7 @@ pub const Bunfig = struct { var loader_names = try this.allocator.alloc(string, properties.len); var loader_values = try this.allocator.alloc(Api.Loader, properties.len); - for (properties) |item, i| { + for (properties, 0..) |item, i| { var key = item.key.?.asString(allocator).?; if (key.len == 0) continue; if (key[0] != '.') { |