mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 08:50:19 +00:00
Add the rest of the suggestions from code review
This commit is contained in:
1 parent
bbb59fd7fa
commit
d32b90ee5c
4 files changed
+13
-11
No files matched your search
+4
-4
@@ -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(
|
||||
|
||||
Reference in new issue
Block a user