mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-03 01:21:25 +00:00
Return value directly
This commit is contained in:
1 parent
45fc206891
commit
b573617a7c
1 file changed
+2
-3
+2
-3
@@ -207,7 +207,7 @@ fn build_export_manager(matches: &ArgMatches<'_>) -> ExportManager {
|
|||||||
fn build_commands<'a>(matches: &'a ArgMatches<'_>) -> Vec<Command<'a>> {
|
fn build_commands<'a>(matches: &'a ArgMatches<'_>) -> Vec<Command<'a>> {
|
||||||
let command_strings = matches.values_of("command").unwrap();
|
let command_strings = matches.values_of("command").unwrap();
|
||||||
|
|
||||||
let commands = if let Some(args) = matches.values_of("parameter-scan") {
|
if let Some(args) = matches.values_of("parameter-scan") {
|
||||||
match parse_parameter_scan_args(args) {
|
match parse_parameter_scan_args(args) {
|
||||||
Ok((param_name, param_range)) => {
|
Ok((param_name, param_range)) => {
|
||||||
let mut commands = vec![];
|
let mut commands = vec![];
|
||||||
@@ -223,6 +223,5 @@ fn build_commands<'a>(matches: &'a ArgMatches<'_>) -> Vec<Command<'a>> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
command_strings.map(|c| Command::new(c)).collect()
|
command_strings.map(|c| Command::new(c)).collect()
|
||||||
};
|
}
|
||||||
commands
|
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user