diff options
| author | 2021-07-17 10:43:05 +0000 | |
|---|---|---|
| committer | 2021-07-17 10:43:05 +0000 | |
| commit | 9bff7f332b86a18ff2f34e5c59ebdad5336e9850 (patch) | |
| tree | c52a4f776554ae4378f57a35d8b6b264a89cb739 /example/streaming-clap.zig | |
| parent | Forward diagnostics down to StreamingClap (diff) | |
| download | zig-clap-9bff7f332b86a18ff2f34e5c59ebdad5336e9850.tar.gz zig-clap-9bff7f332b86a18ff2f34e5c59ebdad5336e9850.tar.xz zig-clap-9bff7f332b86a18ff2f34e5c59ebdad5336e9850.zip | |
Use debug.print instead of deprecated debug.warn in examples
fixes comment on #11
Diffstat (limited to 'example/streaming-clap.zig')
| -rw-r--r-- | example/streaming-clap.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/example/streaming-clap.zig b/example/streaming-clap.zig index 5f7f219..9ed38dd 100644 --- a/example/streaming-clap.zig +++ b/example/streaming-clap.zig | |||
| @@ -44,13 +44,13 @@ pub fn main() !void { | |||
| 44 | }) |arg| { | 44 | }) |arg| { |
| 45 | // arg.param will point to the parameter which matched the argument. | 45 | // arg.param will point to the parameter which matched the argument. |
| 46 | switch (arg.param.id) { | 46 | switch (arg.param.id) { |
| 47 | 'h' => debug.warn("Help!\n", .{}), | 47 | 'h' => debug.print("Help!\n", .{}), |
| 48 | 'n' => debug.warn("--number = {s}\n", .{arg.value.?}), | 48 | 'n' => debug.print("--number = {s}\n", .{arg.value.?}), |
| 49 | 49 | ||
| 50 | // arg.value == null, if arg.param.takes_value == .none. | 50 | // arg.value == null, if arg.param.takes_value == .none. |
| 51 | // Otherwise, arg.value is the value passed with the argument, such as "-a=10" | 51 | // Otherwise, arg.value is the value passed with the argument, such as "-a=10" |
| 52 | // or "-a 10". | 52 | // or "-a 10". |
| 53 | 'f' => debug.warn("{s}\n", .{arg.value.?}), | 53 | 'f' => debug.print("{s}\n", .{arg.value.?}), |
| 54 | else => unreachable, | 54 | else => unreachable, |
| 55 | } | 55 | } |
| 56 | } | 56 | } |