Use enum instead of bool

This commit is contained in:
sharkdp committed 2018-01-18 18:39:17 +01:00
1 parent f44f24c8d9
commit d42994bf64
3 files changed
+24 -12

No files matched your search

+4 -2
View File
@@ -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);