mirror of
https://github.com/clap-rs/clap
synced 2024-11-12 23:57:10 +00:00
chore: use if instead of matching
Co-authored-by: CreepySkeleton <creepy-skeleton@yandex.ru>
This commit is contained in:
parent
530b179776
commit
d525be42c5
1 changed files with 4 additions and 3 deletions
|
@ -568,9 +568,10 @@ impl<'help, 'app, 'parser, 'writer> Help<'help, 'app, 'parser, 'writer> {
|
|||
|
||||
spec_vals.push(format!("[possible values: {}]", a.possible_vals.join(", ")));
|
||||
}
|
||||
let prefix = match !spec_vals.is_empty() && !a.get_about().unwrap_or("").is_empty() {
|
||||
true => " ",
|
||||
false => "",
|
||||
let prefix = if !spec_vals.is_empty() && !a.get_about().unwrap_or("").is_empty() {
|
||||
" "
|
||||
} else {
|
||||
""
|
||||
};
|
||||
prefix.to_string() + &spec_vals.join(" ")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue