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

This commit is contained in:
Andrew Kelley 2024-04-14 18:08:42 -07:00
parent 10106660e9
commit 36060a774e

View File

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