Reduce again the number of match calls (#7815)

- Reduce the number of match calls (see commit messages)
- A few miscellaneous improvements
This commit is contained in:
Hofer-Julian
2023-01-24 12:23:42 +01:00
committed by GitHub
parent 0bb2e47c98
commit 41306aa7e0
49 changed files with 467 additions and 634 deletions

View File

@ -171,15 +171,8 @@ fn create_help_manual(cmd: &Command) -> HelpManual {
}
fn __create_help_manual(manual: Option<HelpManual>, name: &'static str) -> HelpManual {
match manual {
Some(manual) => manual,
None => HelpManual {
name,
description: "",
arguments: Vec::new(),
examples: Vec::new(),
input: Vec::new(),
config_options: Vec::new(),
},
}
manual.unwrap_or(HelpManual {
name,
..HelpManual::default()
})
}