diff options
| author | 2019-12-10 18:54:44 -0800 | |
|---|---|---|
| committer | 2019-12-10 18:54:44 -0800 | |
| commit | e9264d39cbaa0f67b68afdd6ee2851d236b4e504 (patch) | |
| tree | ac893e1d6d3da5bbee29a3bd705aebde8ceb1060 /clap.zig | |
| parent | Merge pull request #13 from dbandstra/update-for-varargs-removal (diff) | |
| download | zig-clap-e9264d39cbaa0f67b68afdd6ee2851d236b4e504.tar.gz zig-clap-e9264d39cbaa0f67b68afdd6ee2851d236b4e504.tar.xz zig-clap-e9264d39cbaa0f67b68afdd6ee2851d236b4e504.zip | |
update for latest zig (typeOf was renamed)
Diffstat (limited to 'clap.zig')
| -rw-r--r-- | clap.zig | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -276,8 +276,8 @@ pub fn helpFull( | |||
| 276 | params: []const Param(Id), | 276 | params: []const Param(Id), |
| 277 | comptime Error: type, | 277 | comptime Error: type, |
| 278 | context: var, | 278 | context: var, |
| 279 | help_text: fn (@typeOf(context), Param(Id)) Error![]const u8, | 279 | help_text: fn (@TypeOf(context), Param(Id)) Error![]const u8, |
| 280 | value_text: fn (@typeOf(context), Param(Id)) Error![]const u8, | 280 | value_text: fn (@TypeOf(context), Param(Id)) Error![]const u8, |
| 281 | ) !void { | 281 | ) !void { |
| 282 | const max_spacing = blk: { | 282 | const max_spacing = blk: { |
| 283 | var res: usize = 0; | 283 | var res: usize = 0; |
| @@ -295,7 +295,7 @@ pub fn helpFull( | |||
| 295 | if (param.names.short == null and param.names.long == null) | 295 | if (param.names.short == null and param.names.long == null) |
| 296 | continue; | 296 | continue; |
| 297 | 297 | ||
| 298 | var counting_stream = io.CountingOutStream(@typeOf(stream.*).Error).init(stream); | 298 | var counting_stream = io.CountingOutStream(@TypeOf(stream.*).Error).init(stream); |
| 299 | try stream.print("\t", .{}); | 299 | try stream.print("\t", .{}); |
| 300 | try printParam(&counting_stream.stream, Id, param, Error, context, value_text); | 300 | try printParam(&counting_stream.stream, Id, param, Error, context, value_text); |
| 301 | try stream.writeByteNTimes(' ', max_spacing - counting_stream.bytes_written); | 301 | try stream.writeByteNTimes(' ', max_spacing - counting_stream.bytes_written); |
| @@ -309,8 +309,8 @@ fn printParam( | |||
| 309 | param: Param(Id), | 309 | param: Param(Id), |
| 310 | comptime Error: type, | 310 | comptime Error: type, |
| 311 | context: var, | 311 | context: var, |
| 312 | value_text: fn (@typeOf(context), Param(Id)) Error![]const u8, | 312 | value_text: fn (@TypeOf(context), Param(Id)) Error![]const u8, |
| 313 | ) @typeOf(stream.*).Error!void { | 313 | ) @TypeOf(stream.*).Error!void { |
| 314 | if (param.names.short) |s| { | 314 | if (param.names.short) |s| { |
| 315 | try stream.print("-{c}", .{ s }); | 315 | try stream.print("-{c}", .{ s }); |
| 316 | } else { | 316 | } else { |