From 947abb7626cae990c407d347f62a625001c17cdf Mon Sep 17 00:00:00 2001 From: LeRoyce Pearson Date: Sat, 14 Mar 2020 17:13:46 -0600 Subject: [PATCH] Fix compile error on windows --- lib/std/fs.zig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/std/fs.zig b/lib/std/fs.zig index d5b7c72e7d..d324ad6e3c 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -1860,7 +1860,7 @@ fn run_lock_file_test(contexts: []FileLockTestContext) !void { } if (builtin.os.tag == .windows) { - const threads = std.ArrayList(*std.Thread).init(testing.allocator); + var threads = std.ArrayList(*std.Thread).init(std.testing.allocator); defer { for (threads.toSlice()) |thread| { thread.wait(); @@ -1868,7 +1868,7 @@ fn run_lock_file_test(contexts: []FileLockTestContext) !void { threads.deinit(); } for (ctxs) |*ctx, idx| { - threads.append(try std.Thread.spawn(ctx, Context.run)); + try threads.append(try std.Thread.spawn(ctx, FileLockTestContext.run)); } } else { var ctx_opt: ?*FileLockTestContext = null;