Update lib/std/fs/test.zig

Co-authored-by: Joachim Schmidt <joachim.schmidt557@outlook.com>
This commit is contained in:
Jakub Konka 2020-07-02 20:54:57 +02:00 committed by GitHub
parent b5badd1122
commit e7d02eae4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ test "Dir.Iterator" {
while (try iter.next()) |entry| {
// We cannot just store `entry` as on Windows, we're re-using the name buffer
// which means we'll actually share the `name` pointer between entries!
const name = try mem.dupe(&arena.allocator, u8, entry.name);
const name = try arena.allocator.dupe(u8, entry.name);
try entries.append(Dir.Entry{ .name = name, .kind = entry.kind });
}