mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-02 17:11:28 +00:00
refactor code
Signed-off-by: Saurav Sharma <appdroiddeveloper@gmail.com>
This commit is contained in:
1 parent
bc82bd5f23
commit
d1cd30b2a3
3 files changed
+20
-27
No files matched your search
+3
-5
@@ -123,11 +123,9 @@ fn build_hyperfine_options(matches: &ArgMatches<'_>) -> Result<HyperfineOptions,
|
||||
(None, None) => {}
|
||||
};
|
||||
|
||||
if let Some(values) = matches.values_of("prepare") {
|
||||
options.preparation_command = Some(values.map(String::from).collect::<Vec<String>>());
|
||||
} else {
|
||||
options.preparation_command = None;
|
||||
}
|
||||
options.preparation_command = matches
|
||||
.values_of("prepare")
|
||||
.map(|values| values.map(String::from).collect::<Vec<String>>());
|
||||
|
||||
options.cleanup_command = matches.value_of("cleanup").map(String::from);
|
||||
|
||||
|
||||
Reference in new issue
Block a user