aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/api/filesystem_router.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/bun.js/api/filesystem_router.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/bun.js/api/filesystem_router.zig')
-rw-r--r--src/bun.js/api/filesystem_router.zig4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bun.js/api/filesystem_router.zig b/src/bun.js/api/filesystem_router.zig
index 7141b5f5e..6e5465055 100644
--- a/src/bun.js/api/filesystem_router.zig
+++ b/src/bun.js/api/filesystem_router.zig
@@ -424,7 +424,7 @@ pub const FileSystemRouter = struct {
var name_strings = bun.default_allocator.alloc(ZigString, names.len * 2) catch unreachable;
defer bun.default_allocator.free(name_strings);
var paths_strings = name_strings[names.len..];
- for (names) |name, i| {
+ for (names, 0..) |name, i| {
name_strings[i] = ZigString.init(name).withEncoding();
paths_strings[i] = ZigString.init(paths[i]).withEncoding();
}
@@ -610,7 +610,7 @@ pub const MatchedRoute = struct {
std.debug.assert(entry.values.len > 0);
if (entry.values.len > 1) {
var values = query_string_value_refs_buf[0..entry.values.len];
- for (entry.values) |value, i| {
+ for (entry.values, 0..) |value, i| {
values[i] = ZigString.init(value).withEncoding();
}
obj.putRecord(global, &str, values.ptr, values.len);