std.fs: fix incorrect passing of pointer to temporary

This commit is contained in:
Veikka Tuominen 2022-06-05 21:16:42 +03:00 committed by Andrew Kelley
parent bb84c87a47
commit 61c5d8f8f1

View File

@ -887,10 +887,8 @@ pub const Dir = struct {
}
pub fn deinit(self: *Walker) void {
while (self.stack.popOrNull()) |*item| {
if (self.stack.items.len != 0) {
item.iter.dir.close();
}
for (self.stack.items) |*item| {
item.iter.dir.close();
}
self.stack.deinit();
self.name_buffer.deinit();