Skip to content

Commit

Permalink
Add comment about memory invalidation in Iterator.next on Win
Browse files Browse the repository at this point in the history
  • Loading branch information
kubkon committed Jul 7, 2020
1 parent e7d02ea commit 417c928
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/std/fs.zig
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,8 @@ pub const Dir = struct {

pub const Error = IteratorError;

/// Memory such as file names referenced in this returned entry becomes invalid
/// with subsequent calls to `next`, as well as when this `Dir` is deinitialized.
pub fn next(self: *Self) Error!?Entry {
start_over: while (true) {
const w = os.windows;
Expand Down

0 comments on commit 417c928

Please sign in to comment.