mirror of
https://github.com/nushell/nushell.git
synced 2025-08-16 23:41:40 +02:00
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:
@ -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()
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user