diff options
| author | Lee Cannon <leecannon@leecannon.xyz> | 2020-11-07 15:13:30 +0000 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2020-11-18 15:37:44 +0100 |
| commit | dbbe709dc7a759a8cc1e780ec1d3dbef9d23ea16 (patch) | |
| tree | 718787859d33a0ade321846e5020017fc0645154 /lib/std/os.zig | |
| parent | 32c998e03c38fabfb3f26ad7f88817ec8a8e5f6d (diff) | |
| download | zig-dbbe709dc7a759a8cc1e780ec1d3dbef9d23ea16.tar.gz zig-dbbe709dc7a759a8cc1e780ec1d3dbef9d23ea16.zip | |
use else in err switch
Diffstat (limited to 'lib/std/os.zig')
| -rw-r--r-- | lib/std/os.zig | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/std/os.zig b/lib/std/os.zig index cfa9c99643..2048e8735b 100644 --- a/lib/std/os.zig +++ b/lib/std/os.zig @@ -2309,13 +2309,8 @@ pub fn chdir(dir_path: []const u8) ChangeCurDirError!void { @compileError("chdir is not supported in WASI"); } else if (builtin.os.tag == .windows) { windows.SetCurrentDirectory(dir_path) catch |err| switch (err) { - error.InvalidUtf8 => return error.InvalidUtf8, - error.NameTooLong => return error.NameTooLong, - error.FileNotFound => return error.FileNotFound, - error.NotDir => return error.NotDir, error.NoDevice => return error.FileSystem, - error.AccessDenied => return error.AccessDenied, - error.Unexpected => return error.Unexpected, + else => |e| return e, }; } else { const dir_path_c = try toPosixPath(dir_path); |
