Add the rest of the suggestions from code review

This commit is contained in:
Steve Nease authored and David Peter committed 2023-03-15 09:33:49 +01:00
1 parent bbb59fd7fa
commit d32b90ee5c
4 files changed
+13 -11

No files matched your search

+4 -4
View File
@@ -223,14 +223,14 @@ pub struct Options {
/// Determines how we run commands
pub executor_kind: ExecutorKind,
/// Where input to the benchmarked command comes from
pub command_input_policy: CommandInputPolicy,
/// What to do with the output of the benchmarked command
pub command_output_policy: CommandOutputPolicy,
/// Which time unit to use when displaying results
pub time_unit: Option<Unit>,
/// Where input to the benchmarked command comes from
pub command_input_policy: CommandInputPolicy,
}
impl Default for Options {
@@ -388,7 +388,7 @@ impl Options {
.map_err(|e| OptionsError::FloatParsingError("min-benchmarking-time", e))?;
}
options.command_input_policy = if let Some(path_str) = matches.value_of("stdin-data") {
options.command_input_policy = if let Some(path_str) = matches.value_of("input") {
let path = PathBuf::from(path_str);
if !path.exists() {
return Err(OptionsError::StdinDataFileDoesNotExist(