Skip to content

Commit

Permalink
style: Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Apr 18, 2023
1 parent ca74207 commit f7938da
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clap_builder/src/output/help_template.rs
Expand Up @@ -494,7 +494,7 @@ impl<'cmd, 'writer> HelpTemplate<'cmd, 'writer> {
self.short(arg);
self.long(arg);
self.writer
.push_styled(&arg.stylize_arg_suffix(&self.styles, None));
.push_styled(&arg.stylize_arg_suffix(self.styles, None));
self.align_to_about(arg, next_line_help, longest);

let about = if self.use_long {
Expand Down
8 changes: 4 additions & 4 deletions clap_builder/src/output/usage.rs
Expand Up @@ -298,7 +298,7 @@ impl<'cmd> Usage<'cmd> {
continue;
}

let stylized = arg.stylized(&self.styles, Some(!force_optional));
let stylized = arg.stylized(self.styles, Some(!force_optional));
if let Some(index) = arg.get_index() {
let new_len = index + 1;
if required_positionals.len() < new_len {
Expand Down Expand Up @@ -339,10 +339,10 @@ impl<'cmd> Usage<'cmd> {
if pos.is_last_set() {
styled = StyledStr::new();
let _ = write!(styled, "{}[--{} ", literal.render(), literal.render_reset());
styled.push_styled(&pos.stylized(&self.styles, Some(true)));
styled.push_styled(&pos.stylized(self.styles, Some(true)));
let _ = write!(styled, "{}]{}", literal.render(), literal.render_reset());
} else {
styled = pos.stylized(&self.styles, Some(false));
styled = pos.stylized(self.styles, Some(false));
}
required_positionals[index] = Some(styled);
}
Expand Down Expand Up @@ -462,7 +462,7 @@ impl<'cmd> Usage<'cmd> {
continue;
}

let stylized = arg.stylized(&self.styles, Some(true));
let stylized = arg.stylized(self.styles, Some(true));
if let Some(index) = arg.get_index() {
if !arg.is_last_set() || incl_last {
let new_len = index + 1;
Expand Down

0 comments on commit f7938da

Please sign in to comment.