authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-04-14 18:08:42-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-04-14 18:08:42-07:00
log36060a774e74668a849ffd81545f082c81cbdbfe
treebeb55dd1555d7311ab417d41f439a4147cf2d3ec
parent10106660e92363d9ff95481eb6a6a4a9d73f843f

fix namespacing of std.fs.Dir.Walker.Entry


1 files changed, 2 insertions(+), 2 deletions(-)

lib/std/fs/Dir.zig+2-2
...@@ -650,7 +650,7 @@ pub const Walker = struct {...@@ -650,7 +650,7 @@ pub const Walker = struct {
650 name_buffer: std.ArrayListUnmanaged(u8),650 name_buffer: std.ArrayListUnmanaged(u8),
651 allocator: Allocator,651 allocator: Allocator,
652652
653 pub const WalkerEntry = struct {653 pub const Entry = struct {
654 /// The containing directory. This can be used to operate directly on `basename`654 /// The containing directory. This can be used to operate directly on `basename`
655 /// rather than `path`, avoiding `error.NameTooLong` for deeply nested paths.655 /// rather than `path`, avoiding `error.NameTooLong` for deeply nested paths.
656 /// The directory remains open until `next` or `deinit` is called.656 /// The directory remains open until `next` or `deinit` is called.
...@@ -668,7 +668,7 @@ pub const Walker = struct {...@@ -668,7 +668,7 @@ pub const Walker = struct {
668 /// After each call to this function, and on deinit(), the memory returned668 /// After each call to this function, and on deinit(), the memory returned
669 /// from this function becomes invalid. A copy must be made in order to keep669 /// from this function becomes invalid. A copy must be made in order to keep
670 /// a reference to the path.670 /// a reference to the path.
671 pub fn next(self: *Walker) !?WalkerEntry {671 pub fn next(self: *Walker) !?Walker.Entry {
672 const gpa = self.allocator;672 const gpa = self.allocator;
673 while (self.stack.items.len != 0) {673 while (self.stack.items.len != 0) {
674 // `top` and `containing` become invalid after appending to `self.stack`674 // `top` and `containing` become invalid after appending to `self.stack`