From 3c35ff18bb32fec2f53e12e6bdbb00422d6c33fe Mon Sep 17 00:00:00 2001 From: Takumi Katase Date: Fri, 2 Jan 2026 20:59:20 +0900 Subject: chore: update examples to use std.Io for Zig v0.16 compatibility Signed-off-by: Takumi Katase --- example/help.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'example/help.zig') diff --git a/example/help.zig b/example/help.zig index d8e8f12..a4379de 100644 --- a/example/help.zig +++ b/example/help.zig @@ -13,12 +13,14 @@ pub fn main() !void { }); defer res.deinit(); + var threaded: std.Io.Threaded = .init_single_threaded; + const io: std.Io = threaded.io(); // `clap.help` is a function that can print a simple help message. It can print any `Param` // where `Id` has a `description` and `value` method (`Param(Help)` is one such parameter). // The last argument contains options as to how `help` should print those parameters. Using // `.{}` means the default options. if (res.args.help != 0) - return clap.helpToFile(.stderr(), clap.Help, ¶ms, .{}); + return clap.helpToFile(io, .stderr(), clap.Help, ¶ms, .{}); } const clap = @import("clap"); -- cgit v1.2.3