aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os.zig
diff options
context:
space:
mode:
authorLeRoyce Pearson <leroycepearson@geemili.xyz>2020-04-08 08:37:17 -0600
committerLeRoyce Pearson <leroycepearson@geemili.xyz>2020-04-08 08:37:17 -0600
commitd0d7895d3308763422e4da0eb5d6e03c445f1b08 (patch)
tree95332f214fd3d89cb79bf555acaff2536a2ddf6c /lib/std/os.zig
parent45d6fb9e3691120428a70f659cc211faf6cb1897 (diff)
downloadzig-d0d7895d3308763422e4da0eb5d6e03c445f1b08.tar.gz
zig-d0d7895d3308763422e4da0eb5d6e03c445f1b08.zip
Return error from `else`
That removes the other switch cases (`error.WouldBlock` here) from the error set, I think.
Diffstat (limited to 'lib/std/os.zig')
-rw-r--r--lib/std/os.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig
index bda54a0458..0ce10601b7 100644
--- a/lib/std/os.zig
+++ b/lib/std/os.zig
@@ -1682,7 +1682,7 @@ pub fn renameatW(
const access_mask = windows.SYNCHRONIZE | windows.GENERIC_WRITE | windows.DELETE;
const src_fd = windows.OpenFileW(old_dir_fd, old_path, null, access_mask, null, false, windows.FILE_OPEN) catch |err| switch (err) {
error.WouldBlock => unreachable,
- else => return err,
+ else => |e| return e,
};
defer windows.CloseHandle(src_fd);