zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 225f1968426d333834465dae526b3d2ae242cd8f (tree)
parent 64dfd1883eb2b9ab175af9b07c84bd4b53b7e904
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Sat, 20 Jun 2020 20:43:56 -0400

std.fs: fix shadowing `stat` with a local variable

Diffstat:
Mlib/std/fs.zig | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/std/fs.zig b/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 });