From fb1eb05c2114123fff3981923bacfb74ac6b03ae Mon Sep 17 00:00:00 2001 From: Asherah Connor Date: Sun, 10 Jan 2021 12:34:39 +1100 Subject: zig master updates --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 3156539..23c2672 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ pub fn main() !void { var args = clap.parse(clap.Help, ¶ms, std.heap.page_allocator, &diag) catch |err| { // Report useful error and exit - diag.report(std.io.getStdErr().outStream(), err) catch {}; + diag.report(std.io.getStdErr().writer(), err) catch {}; return err; }; defer args.deinit(); @@ -151,7 +151,7 @@ pub fn main() !void { // Because we use a streaming parser, we have to consume each argument parsed individually. while (parser.next(&diag) catch |err| { // Report useful error and exit - diag.report(std.io.getStdErr().outStream(), err) catch {}; + diag.report(std.io.getStdErr().writer(), err) catch {}; return err; }) |arg| { // arg.param will point to the parameter which matched the argument. @@ -184,7 +184,7 @@ const clap = @import("clap"); pub fn main() !void { const stderr_file = std.io.getStdErr(); - var stderr_out_stream = stderr_file.outStream(); + var stderr_out_stream = stderr_file.writer(); // clap.help is a function that can print a simple help message, given a // slice of Param(Help). There is also a helpEx, which can print a @@ -224,7 +224,7 @@ const std = @import("std"); const clap = @import("clap"); pub fn main() !void { - const stderr = std.io.getStdErr().outStream(); + const stderr = std.io.getStdErr().writer(); // clap.usage is a function that can print a simple usage message, given a // slice of Param(Help). There is also a usageEx, which can print a -- cgit v1.2.3