summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jimmi Holst Christensen2018-03-22 15:53:29 +0100
committerGravatar Jimmi Holst Christensen2018-03-22 15:53:29 +0100
commit659b1ef903f7b14949b9c8231bce228bf6ad2e31 (patch)
treeafe8f8075577eae6122607590f482193ffaad588
parentMajor refactor of clap (diff)
downloadzig-clap-659b1ef903f7b14949b9c8231bce228bf6ad2e31.tar.gz
zig-clap-659b1ef903f7b14949b9c8231bce228bf6ad2e31.tar.xz
zig-clap-659b1ef903f7b14949b9c8231bce228bf6ad2e31.zip
Fixed compiler errors
-rw-r--r--clap.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/clap.zig b/clap.zig
index b3f859b..bb08251 100644
--- a/clap.zig
+++ b/clap.zig
@@ -51,9 +51,9 @@ pub fn Clap(comptime Result: type) type {
51 return res; 51 return res;
52 } 52 }
53 53
54 pub fn version(builder: &const Builder, version: []const u8) Builder { 54 pub fn version(builder: &const Builder, version_str: []const u8) Builder {
55 var res = *builder; 55 var res = *builder;
56 res.result.author = version; 56 res.result.author = version_str;
57 return res; 57 return res;
58 } 58 }
59 59
@@ -267,7 +267,7 @@ pub const Command = struct {
267 return error.CannotParseStringAsBool; 267 return error.CannotParseStringAsBool;
268 }, 268 },
269 TypeId.Int, TypeId.IntLiteral => return fmt.parseInt(Result, str, 10), 269 TypeId.Int, TypeId.IntLiteral => return fmt.parseInt(Result, str, 10),
270 TypeId.Float, TypeId.FloatLiteral => return fmt.parseFloat(Result, str), 270 TypeId.Float, TypeId.FloatLiteral => @compileError("TODO: Implement str to float"),
271 TypeId.Nullable => { 271 TypeId.Nullable => {
272 if (mem.eql(u8, "null", str)) 272 if (mem.eql(u8, "null", str))
273 return null; 273 return null;