mirror of
https://github.com/ziglang/zig.git
synced 2025-02-02 20:21:35 +00:00
Return error from else
That removes the other switch cases (`error.WouldBlock` here) from the error set, I think.
This commit is contained in:
parent
45d6fb9e36
commit
d0d7895d33
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user