aboutsummaryrefslogtreecommitdiff
path: root/src/deps
diff options
context:
space:
mode:
Diffstat (limited to 'src/deps')
-rw-r--r--src/deps/c_ares.zig8
-rw-r--r--src/deps/picohttp.zig4
-rw-r--r--src/deps/zig-clap/clap/args.zig2
-rw-r--r--src/deps/zig-clap/clap/comptime.zig4
-rw-r--r--src/deps/zig-datetime/src/datetime.zig4
5 files changed, 11 insertions, 11 deletions
diff --git a/src/deps/c_ares.zig b/src/deps/c_ares.zig
index c3e452772..5f42000e2 100644
--- a/src/deps/c_ares.zig
+++ b/src/deps/c_ares.zig
@@ -186,7 +186,7 @@ pub const struct_hostent = extern struct {
// A cname lookup always returns a single record but we follow the common API here.
if (comptime strings.eqlComptime(lookup_name, "cname")) {
- if(this.h_name != null){
+ if (this.h_name != null) {
const array = JSC.JSValue.createEmptyArray(globalThis, 1);
const h_name_len = bun.len(this.h_name);
const h_name_slice = this.h_name[0..h_name_len];
@@ -195,10 +195,10 @@ pub const struct_hostent = extern struct {
}
return JSC.JSValue.createEmptyArray(globalThis, 0);
} else {
- if (this.h_aliases == null){
+ if (this.h_aliases == null) {
return JSC.JSValue.createEmptyArray(globalThis, 0);
}
-
+
var count: u32 = 0;
while (this.h_aliases[count] != null) {
count += 1;
@@ -502,7 +502,7 @@ pub const Channel = opaque {
};
var hints_buf: [3]AddrInfo_hints = bun.zero([3]AddrInfo_hints);
- for (hints[0..@min(hints.len, 2)]) |hint, i| {
+ for (hints[0..@min(hints.len, 2)], 0..) |hint, i| {
hints_buf[i] = hint;
}
var hints_: [*c]const AddrInfo_hints = if (hints.len > 0) &hints_buf else null;
diff --git a/src/deps/picohttp.zig b/src/deps/picohttp.zig
index 3ebd34e8a..e483df5fa 100644
--- a/src/deps/picohttp.zig
+++ b/src/deps/picohttp.zig
@@ -60,7 +60,7 @@ pub const Request = struct {
bytes_read: u32 = 0,
pub fn clone(this: *const Request, headers: []Header, builder: *StringBuilder) Request {
- for (this.headers) |header, i| {
+ for (this.headers, 0..) |header, i| {
headers[i] = header.clone(builder);
}
@@ -144,7 +144,7 @@ pub const Response = struct {
var that = this.*;
that.status = builder.append(this.status);
- for (this.headers) |header, i| {
+ for (this.headers, 0..) |header, i| {
headers[i] = header.clone(builder);
}
diff --git a/src/deps/zig-clap/clap/args.zig b/src/deps/zig-clap/clap/args.zig
index c53ca7ec6..a1fa3773a 100644
--- a/src/deps/zig-clap/clap/args.zig
+++ b/src/deps/zig-clap/clap/args.zig
@@ -113,7 +113,7 @@ pub const ShellIterator = struct {
after_quote,
} = .skip_whitespace;
- for (iter.str) |c, i| {
+ for (iter.str, 0..) |c, i| {
switch (state) {
// The state that skips the initial whitespace.
.skip_whitespace => switch (c) {
diff --git a/src/deps/zig-clap/clap/comptime.zig b/src/deps/zig-clap/clap/comptime.zig
index b4739d646..3dcd4f7d7 100644
--- a/src/deps/zig-clap/clap/comptime.zig
+++ b/src/deps/zig-clap/clap/comptime.zig
@@ -50,7 +50,7 @@ pub fn ComptimeClap(
pub fn parse(iter: anytype, opt: clap.ParseOptions) !@This() {
const allocator = opt.allocator;
var multis = [_]std.ArrayList([]const u8){undefined} ** multi_options;
- for (multis) |*multi| {
+ for (&multis) |*multi| {
multi.* = std.ArrayList([]const u8).init(allocator);
}
@@ -109,7 +109,7 @@ pub fn ComptimeClap(
}
}
- for (multis) |*multi, i|
+ for (&multis, 0..) |*multi, i|
res.multi_options[i] = try multi.toOwnedSlice();
res.pos = try pos.toOwnedSlice();
res.passthrough_positionals = try passthrough_positionals.toOwnedSlice();
diff --git a/src/deps/zig-datetime/src/datetime.zig b/src/deps/zig-datetime/src/datetime.zig
index 578356fa8..29a936630 100644
--- a/src/deps/zig-datetime/src/datetime.zig
+++ b/src/deps/zig-datetime/src/datetime.zig
@@ -187,7 +187,7 @@ test "iso-first-monday" {
// Created using python
const years = [20]u16{ 1816, 1823, 1839, 1849, 1849, 1870, 1879, 1882, 1909, 1910, 1917, 1934, 1948, 1965, 1989, 2008, 2064, 2072, 2091, 2096 };
const output = [20]u32{ 662915, 665470, 671315, 674969, 674969, 682641, 685924, 687023, 696886, 697250, 699805, 706014, 711124, 717340, 726104, 733041, 753495, 756421, 763358, 765185 };
- for (years) |year, i| {
+ for (years, 0..) |year, i| {
try testing.expectEqual(daysBeforeFirstMonday(year), output[i]);
}
}
@@ -785,7 +785,7 @@ test "date-isocalendar" {
ISOCalendar{ .year = 2024, .week = 3, .weekday = 2 },
};
- for (dates) |d, i| {
+ for (dates, 0..) |d, i| {
const date = try Date.parseIso(d);
const cal = date.isoCalendar();
try testing.expectEqual(cal, expect[i]);