mirror of
https://github.com/sharkdp/hyperfine.git
synced 2026-11-01 17:00:18 +00:00
Merges new and validate methods of RangeStep into one method, renames error names according to code review.
This commit is contained in:
1 parent
d4a0e9afb6
commit
28e8c315dc
3 files changed
+52
-53
No files matched your search
+4
-5
@@ -255,13 +255,12 @@ fn build_commands<'a>(matches: &'a ArgMatches<'_>) -> Vec<Command<'a>> {
|
||||
return Vec::new();
|
||||
}
|
||||
|
||||
// `--command-name` should appear exactly once or same count with parameters.
|
||||
// `--command-name` should appear exactly once or exactly B times,
|
||||
// where B is the total number of benchmarks.
|
||||
let command_name_count = command_names.len();
|
||||
if command_name_count > 1 && command_name_count != param_space_size {
|
||||
let err = OptionsError::DifferentCommandNameCountWithParameters(
|
||||
command_name_count,
|
||||
param_space_size,
|
||||
);
|
||||
let err =
|
||||
OptionsError::UnexpectedCommandNameCount(command_name_count, param_space_size);
|
||||
error(&err.to_string());
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user