summaryrefslogtreecommitdiff
path: root/src/index.zig
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2018-11-14 14:55:05 +0100
committerGravatar Jimmi Holst Christensen2018-11-14 14:55:05 +0100
commit547a9f23f7960de0601b3f325768d58dae3ef5ec (patch)
tree097add1902bdfa95f96d1097bbc2898ab7409fd8 /src/index.zig
parentAdded pub flag/option/positional init funcs to Param (diff)
downloadzig-clap-547a9f23f7960de0601b3f325768d58dae3ef5ec.tar.gz
zig-clap-547a9f23f7960de0601b3f325768d58dae3ef5ec.tar.xz
zig-clap-547a9f23f7960de0601b3f325768d58dae3ef5ec.zip
Zig fmt
Diffstat (limited to 'src/index.zig')
-rw-r--r--src/index.zig5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/index.zig b/src/index.zig
index 5900424..225eb9c 100644
--- a/src/index.zig
+++ b/src/index.zig
@@ -91,11 +91,10 @@ pub fn Param(comptime Id: type) type {
91 return init(id, true, Names{ .short = null, .long = null }); 91 return init(id, true, Names{ .short = null, .long = null });
92 } 92 }
93 93
94 fn init(id: Id, takes_value: bool, names: Names) @This() { 94 pub fn init(id: Id, takes_value: bool, names: Names) @This() {
95 // Assert, that if the param have no name, then it has to take 95 // Assert, that if the param have no name, then it has to take
96 // a value. 96 // a value.
97 debug.assert( 97 debug.assert(names.long != null or
98 names.long != null or
99 names.short != null or 98 names.short != null or
100 takes_value); 99 takes_value);
101 100