mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-10-30 08:40:18 +00:00
Use enum instead of bool
This commit is contained in:
1 parent
f44f24c8d9
commit
d42994bf64
3 files changed
+24
-12
No files matched your search
+4
-2
@@ -13,7 +13,7 @@ use clap::{App, AppSettings, Arg};
|
||||
|
||||
mod hyperfine;
|
||||
|
||||
use hyperfine::internal::HyperfineOptions;
|
||||
use hyperfine::internal::{HyperfineOptions, CmdFailureAction};
|
||||
use hyperfine::benchmark::{mean_shell_spawning_time, run_benchmark};
|
||||
|
||||
/// Print error message to stderr and terminate
|
||||
@@ -109,7 +109,9 @@ fn main() {
|
||||
|
||||
options.preparation_command = matches.value_of("prepare").map(String::from);
|
||||
|
||||
options.ignore_failure = matches.is_present("ignore-failure");
|
||||
if matches.is_present("ignore-failure") {
|
||||
options.failure_action = CmdFailureAction::Ignore;
|
||||
}
|
||||
|
||||
let commands = matches.values_of("command").unwrap().collect();
|
||||
let res = run(&commands, &options);
|
||||
|
||||
Reference in new issue
Block a user