diff options
| -rw-r--r-- | clap.zig | 2 | ||||
| -rw-r--r-- | clap/streaming.zig | 2 |
2 files changed, 2 insertions, 2 deletions
| @@ -293,7 +293,7 @@ pub const Diagnostic = struct { | |||
| 293 | 293 | ||
| 294 | /// Default diagnostics reporter when all you want is English with no colors. | 294 | /// Default diagnostics reporter when all you want is English with no colors. |
| 295 | /// Use this as a reference for implementing your own if needed. | 295 | /// Use this as a reference for implementing your own if needed. |
| 296 | pub fn report(diag: Diagnostic, stream: var, err: anyerror) !void { | 296 | pub fn report(diag: Diagnostic, stream: anytype, err: anyerror) !void { |
| 297 | const prefix = if (diag.name.short) |_| "-" else "--"; | 297 | const prefix = if (diag.name.short) |_| "-" else "--"; |
| 298 | const name = if (diag.name.short) |*c| @as(*const [1]u8, c)[0..] else diag.name.long.?; | 298 | const name = if (diag.name.short) |*c| @as(*const [1]u8, c)[0..] else diag.name.long.?; |
| 299 | 299 | ||
diff --git a/clap/streaming.zig b/clap/streaming.zig index 90c4e02..af57e8f 100644 --- a/clap/streaming.zig +++ b/clap/streaming.zig | |||
| @@ -157,7 +157,7 @@ pub fn StreamingClap(comptime Id: type, comptime ArgIterator: type) type { | |||
| 157 | return err(diag, .{ .short = arg[index] }, error.InvalidArgument); | 157 | return err(diag, .{ .short = arg[index] }, error.InvalidArgument); |
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | fn err(diag: ?*clap.Diagnostic, names: clap.Names, _err: var) @TypeOf(_err) { | 160 | fn err(diag: ?*clap.Diagnostic, names: clap.Names, _err: anytype) @TypeOf(_err) { |
| 161 | if (diag) |d| | 161 | if (diag) |d| |
| 162 | d.name = names; | 162 | d.name = names; |
| 163 | return _err; | 163 | return _err; |