Commit 225f196842

Andrew Kelley <andrew@ziglang.org>
2020-06-21 02:43:56
std.fs: fix shadowing `stat` with a local variable
1 parent 64dfd18
Changed files (1)
lib
std
lib/std/fs.zig
@@ -1517,9 +1517,9 @@ pub const Dir = struct {
 
         var size: ?u64 = null;
         const mode = options.override_mode orelse blk: {
-            const stat = try in_file.stat();
-            size = stat.size;
-            break :blk stat.mode;
+            const st = try in_file.stat();
+            size = st.size;
+            break :blk st.mode;
         };
 
         var atomic_file = try dest_dir.atomicFile(dest_path, .{ .mode = mode });