diff options
| author | 2023-06-22 09:25:54 +0200 | |
|---|---|---|
| committer | 2023-06-22 09:25:54 +0200 | |
| commit | 3d78af4b000758abe6c6761cbf61f5a66abe4f10 (patch) | |
| tree | 67339f1da33a9bca3a30c3ea87d4488ac8501485 /clap.zig | |
| parent | Update to latest version of zig (diff) | |
| download | zig-clap-3d78af4b000758abe6c6761cbf61f5a66abe4f10.tar.gz zig-clap-3d78af4b000758abe6c6761cbf61f5a66abe4f10.tar.xz zig-clap-3d78af4b000758abe6c6761cbf61f5a66abe4f10.zip | |
Update to latest zig
Diffstat (limited to 'clap.zig')
| -rw-r--r-- | clap.zig | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1138,7 +1138,7 @@ pub fn help( | |||
| 1138 | 1138 | ||
| 1139 | const description_indentation = opt.indent + | 1139 | const description_indentation = opt.indent + |
| 1140 | opt.description_indent + | 1140 | opt.description_indent + |
| 1141 | max_spacing * @boolToInt(!opt.description_on_new_line); | 1141 | max_spacing * @intFromBool(!opt.description_on_new_line); |
| 1142 | 1142 | ||
| 1143 | var first_paramter: bool = true; | 1143 | var first_paramter: bool = true; |
| 1144 | for (params) |param| { | 1144 | for (params) |param| { |
| @@ -1266,7 +1266,7 @@ fn DescriptionWriter(comptime UnderlyingWriter: type) type { | |||
| 1266 | debug.assert(word.len != 0); | 1266 | debug.assert(word.len != 0); |
| 1267 | 1267 | ||
| 1268 | var first_word = writer.printed_chars <= writer.indentation; | 1268 | var first_word = writer.printed_chars <= writer.indentation; |
| 1269 | const chars_to_write = word.len + @boolToInt(!first_word); | 1269 | const chars_to_write = word.len + @intFromBool(!first_word); |
| 1270 | if (chars_to_write + writer.printed_chars > writer.max_width) { | 1270 | if (chars_to_write + writer.printed_chars > writer.max_width) { |
| 1271 | // If the word does not fit on this line, then we insert a new line and print | 1271 | // If the word does not fit on this line, then we insert a new line and print |
| 1272 | // it on that line. The only exception to this is if this was the first word. | 1272 | // it on that line. The only exception to this is if this was the first word. |