summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.zig3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.zig b/src/main.zig
index a32217a..fc26d73 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -324,7 +324,8 @@ fn readCommand(allocator: std.mem.Allocator, history: std.ArrayList([]const u8))
matches.deinit(allocator);
}
- if (std.fs.cwd().openDir(".", .{ .iterate = true })) |*dir| {
+ if (std.fs.cwd().openDir(".", .{ .iterate = true })) |opened_dir| {
+ var dir = opened_dir;
defer dir.close();
var iter = dir.iterate();
while (iter.next() catch null) |entry| {