diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-02-01 10:23:25 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-02-01 10:23:25 -0500 |
| commit | 13b36d458f6ba45fdda1c1510e056a7012fb3fff (patch) | |
| tree | 26afe03e50c7206f390ff44b4347bd493cfa067e /std/io.zig | |
| parent | 5f518dbeb952186b7c11777b2454256c8c4fb9ac (diff) | |
| download | zig-13b36d458f6ba45fdda1c1510e056a7012fb3fff.tar.gz zig-13b36d458f6ba45fdda1c1510e056a7012fb3fff.zip | |
*WIP* error sets - fix implicit cast
Diffstat (limited to 'std/io.zig')
| -rw-r--r-- | std/io.zig | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/std/io.zig b/std/io.zig index 2fdb564f15..b9f7157101 100644 --- a/std/io.zig +++ b/std/io.zig @@ -26,7 +26,9 @@ test "import io tests" { } } -pub fn getStdErr() !File { +const GetStdIoErrs = os.WindowsGetStdHandleErrs; + +pub fn getStdErr() GetStdIoErrs!File { const handle = if (is_windows) try os.windowsGetStdHandle(system.STD_ERROR_HANDLE) else if (is_posix) @@ -36,7 +38,7 @@ pub fn getStdErr() !File { return File.openHandle(handle); } -pub fn getStdOut() !File { +pub fn getStdOut() GetStdIoErrs!File { const handle = if (is_windows) try os.windowsGetStdHandle(system.STD_OUTPUT_HANDLE) else if (is_posix) @@ -46,7 +48,7 @@ pub fn getStdOut() !File { return File.openHandle(handle); } -pub fn getStdIn() !File { +pub fn getStdIn() GetStdIoErrs!File { const handle = if (is_windows) try os.windowsGetStdHandle(system.STD_INPUT_HANDLE) else if (is_posix) |
