mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-30 00:38:56 +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>> {
|
||||
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) {
|
||||
Ok((param_name, param_range)) => {
|
||||
let mut commands = vec![];
|
||||
@@ -223,6 +223,5 @@ fn build_commands<'a>(matches: &'a ArgMatches<'_>) -> Vec<Command<'a>> {
|
||||
}
|
||||
} else {
|
||||
command_strings.map(|c| Command::new(c)).collect()
|
||||
};
|
||||
commands
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user