Commit 417c928952

Jakub Konka <kubkon@jakubkonka.com>
2020-07-08 00:03:45
Add comment about memory invalidation in Iterator.next on Win
1 parent e7d02ea
Changed files (1)
lib
std
lib/std/fs.zig
@@ -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;