aboutsummaryrefslogtreecommitdiff
path: root/src/fs.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/fs.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/fs.zig')
-rw-r--r--src/fs.zig8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fs.zig b/src/fs.zig
index 713e25ba8..c1cd6d061 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -295,7 +295,7 @@ pub const FileSystem = struct {
pub fn getComptimeQuery(entry: *const DirEntry, comptime query_str: anytype) ?Entry.Lookup {
comptime var query: [query_str.len]u8 = undefined;
- comptime for (query_str) |c, i| {
+ comptime for (query_str, 0..) |c, i| {
query[i] = std.ascii.toLower(c);
};
@@ -332,7 +332,7 @@ pub const FileSystem = struct {
pub fn hasComptimeQuery(entry: *const DirEntry, comptime query_str: anytype) bool {
comptime var query: [query_str.len]u8 = undefined;
- comptime for (query_str) |c, i| {
+ comptime for (query_str, 0..) |c, i| {
query[i] = std.ascii.toLower(c);
};
@@ -521,7 +521,7 @@ pub const FileSystem = struct {
const LIMITS = [_]std.os.rlimit_resource{ std.os.rlimit_resource.STACK, std.os.rlimit_resource.NOFILE };
Output.print("{{\n", .{});
- inline for (LIMITS) |limit_type, i| {
+ inline for (LIMITS, 0..) |limit_type, i| {
const limit = std.os.getrlimit(limit_type) catch return;
if (i == 0) {
@@ -664,7 +664,7 @@ pub const FileSystem = struct {
// Always try to max out how many files we can keep open
pub fn adjustUlimit() !usize {
const LIMITS = [_]std.os.rlimit_resource{ std.os.rlimit_resource.STACK, std.os.rlimit_resource.NOFILE };
- inline for (LIMITS) |limit_type, i| {
+ inline for (LIMITS, 0..) |limit_type, i| {
const limit = try std.os.getrlimit(limit_type);
if (limit.cur < limit.max) {