aboutsummaryrefslogtreecommitdiff
path: root/src/fs.zig
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-06-06 21:16:43 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-06-06 21:16:43 -0700
commit079fe523d4c397c5e4d877cc2faf8d29139e0a07 (patch)
tree58bea423b5ccde9bb4e6e7aa703e583f2191bd99 /src/fs.zig
parent13653a93a2a4181fcea35576338fe24f465fc748 (diff)
downloadbun-079fe523d4c397c5e4d877cc2faf8d29139e0a07.tar.gz
bun-079fe523d4c397c5e4d877cc2faf8d29139e0a07.tar.zst
bun-079fe523d4c397c5e4d877cc2faf8d29139e0a07.zip
Upgrade hash table
Former-commit-id: 5d208f9ea0be4e5f2a682f25b0a20a623ce61091
Diffstat (limited to 'src/fs.zig')
-rw-r--r--src/fs.zig12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fs.zig b/src/fs.zig
index 7dbcc4f40..a6a1584f4 100644
--- a/src/fs.zig
+++ b/src/fs.zig
@@ -154,7 +154,7 @@ pub const FileSystem = struct {
var iter = i.data.iterator();
i.dir = dir;
while (iter.next()) |entry| {
- entry.value.dir = dir;
+ entry.value_ptr.dir = dir;
}
}
@@ -504,7 +504,7 @@ pub const FileSystem = struct {
}
var entry = watcher.getOrPutValue(path, WatchData{ .state = state }) catch unreachable;
- entry.value.state = state;
+ entry.value_ptr.state = state;
}
}
@@ -519,7 +519,7 @@ pub const FileSystem = struct {
defer fs.watcher_mutex.unlock();
var entry = watcher.getOrPutValue(path, WatchData{ .state = .file_has_mod_key, .mod_key = key }) catch unreachable;
- entry.value.mod_key = key;
+ entry.value_ptr.mod_key = key;
}
return key;
@@ -725,7 +725,7 @@ pub const FileSystem = struct {
fs.watcher_mutex.lock();
defer fs.watcher_mutex.unlock();
var res = watcher.getOrPutValue(path, WatchData{ .state = .file_missing }) catch unreachable;
- res.value.state = .file_missing;
+ res.value_ptr.state = .file_missing;
}
}
@@ -776,8 +776,8 @@ pub const FileSystem = struct {
fs.watcher_mutex.lock();
defer fs.watcher_mutex.unlock();
var res = watcher.getOrPutValue(path, WatchData{}) catch unreachable;
- res.value.state = .file_need_mod_key;
- res.value.file_contents = file_contents;
+ res.value_ptr.state = .file_need_mod_key;
+ res.value_ptr.file_contents = file_contents;
}
return File{ .path = Path.init(path), .contents = file_contents };