Skip to content

Commit

Permalink
Update to latest zig
Browse files Browse the repository at this point in the history
  • Loading branch information
Hejsil committed Jun 22, 2023
1 parent a1b7a73 commit 3d78af4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clap.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ pub fn help(

const description_indentation = opt.indent +
opt.description_indent +
max_spacing * @boolToInt(!opt.description_on_new_line);
max_spacing * @intFromBool(!opt.description_on_new_line);

var first_paramter: bool = true;
for (params) |param| {
Expand Down Expand Up @@ -1266,7 +1266,7 @@ fn DescriptionWriter(comptime UnderlyingWriter: type) type {
debug.assert(word.len != 0);

var first_word = writer.printed_chars <= writer.indentation;
const chars_to_write = word.len + @boolToInt(!first_word);
const chars_to_write = word.len + @intFromBool(!first_word);
if (chars_to_write + writer.printed_chars > writer.max_width) {
// If the word does not fit on this line, then we insert a new line and print
// it on that line. The only exception to this is if this was the first word.
Expand Down

0 comments on commit 3d78af4

Please sign in to comment.