summaryrefslogtreecommitdiff
path: root/clap.zig
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2020-11-02 20:16:43 +0100
committerGravatar Jimmi Holst Christensen2020-11-02 20:16:43 +0100
commitba2530c3a743b00db37b2269b7c1f952e7cc6b35 (patch)
tree02a1a80009c8953fa35f7181bb8f8a015aeaa333 /clap.zig
parentReport error context in Diagnostic (#26) (diff)
downloadzig-clap-ba2530c3a743b00db37b2269b7c1f952e7cc6b35.tar.gz
zig-clap-ba2530c3a743b00db37b2269b7c1f952e7cc6b35.tar.xz
zig-clap-ba2530c3a743b00db37b2269b7c1f952e7cc6b35.zip
Replace `var` with `anytype`
Diffstat (limited to '')
-rw-r--r--clap.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/clap.zig b/clap.zig
index f883858..b7235f1 100644
--- a/clap.zig
+++ b/clap.zig
@@ -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