aboutsummaryrefslogtreecommitdiff
path: root/src/logger.zig
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2023-02-23 23:57:19 -0800
committerGravatar GitHub <noreply@github.com> 2023-02-23 23:57:19 -0800
commit3f04f8d0a653cf5decef2225c2044742b382718a (patch)
tree91eb6500834e3157ecb9ab208101aa368a1191c8 /src/logger.zig
parentb5bdde28ed34070cbb1d34d13f414f4c513ee40d (diff)
downloadbun-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/logger.zig')
-rw-r--r--src/logger.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/logger.zig b/src/logger.zig
index bd2c81c31..da06487b9 100644
--- a/src/logger.zig
+++ b/src/logger.zig
@@ -428,7 +428,7 @@ pub const Msg = struct {
.data = this.data.cloneWithBuilder(builder),
.metadata = this.metadata,
.notes = if (this.notes != null and this.notes.?.len > 0) brk: {
- for (this.notes.?) |note, i| {
+ for (this.notes.?, 0..) |note, i| {
notes[i] = note.cloneWithBuilder(builder);
}
break :brk notes[0..this.notes.?.len];
@@ -469,7 +469,7 @@ pub const Msg = struct {
if (this.notes) |notes| {
if (notes.len > 0) {
- for (notes) |note, i| {
+ for (notes, 0..) |note, i| {
_notes[i] = note.toAPI();
}
}
@@ -480,7 +480,7 @@ pub const Msg = struct {
pub fn toAPIFromList(comptime ListType: type, list: ListType, allocator: std.mem.Allocator) ![]Api.Message {
var out_list = try allocator.alloc(Api.Message, list.items.len);
- for (list.items) |item, i| {
+ for (list.items, 0..) |item, i| {
out_list[i] = try item.toAPI(allocator);
}
@@ -671,7 +671,7 @@ pub const Log = struct {
return JSC.JSValue.fromRef(JSC.BuildError.create(global, allocator, msg));
},
else => {
- for (msgs[0..count]) |msg, i| {
+ for (msgs[0..count], 0..) |msg, i| {
switch (msg.metadata) {
.build => {
errors_stack[i] = JSC.BuildError.create(global, allocator, msg).?;