diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-11-12 20:36:07 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-11-13 04:01:40 +0000 |
| commit | 0237e7a701892a0bf3c57e6868f54421782ff91d (patch) | |
| tree | 0dacfcaf38543d384656b86ce846a3065a0ca1e3 /lib/std/crypto | |
| parent | 8bae70454dabe77dfe7e5344e59ca2180d63af51 (diff) | |
| download | zig-0237e7a701892a0bf3c57e6868f54421782ff91d.tar.gz zig-0237e7a701892a0bf3c57e6868f54421782ff91d.zip | |
std.io.getStdOut and related fns no longer can error
Thanks to the Windows Process Environment Block, it is possible to
obtain handles to the standard input, output, and error streams without
possibility of failure.
Diffstat (limited to 'lib/std/crypto')
| -rw-r--r-- | lib/std/crypto/benchmark.zig | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/std/crypto/benchmark.zig b/lib/std/crypto/benchmark.zig index 7b0747da7b..05edae0b9b 100644 --- a/lib/std/crypto/benchmark.zig +++ b/lib/std/crypto/benchmark.zig @@ -131,9 +131,7 @@ fn printPad(stdout: var, s: []const u8) !void { } pub fn main() !void { - var stdout_file = try std.io.getStdOut(); - var stdout_out_stream = stdout_file.outStream(); - const stdout = &stdout_out_stream.stream; + const stdout = &std.io.getStdOut().outStream().stream; var buffer: [1024]u8 = undefined; var fixed = std.heap.FixedBufferAllocator.init(buffer[0..]); |
