Addressed review comments.

This commit is contained in:
Diogo Sousa authored and David Peter committed 2018-09-09 23:18:18 +02:00
1 parent d78c33b864
commit 0466a1d7cf
4 files changed
+12 -8

No files matched your search

+2 -2
View File
@@ -148,14 +148,14 @@ fn build_hyperfine_options(matches: &ArgMatches) -> Result<HyperfineOptions, Opt
(None, Some(max)) => {
// Since the minimum was not explicit we lower it if max is below the default min.
options.runs.min = cmp::min(options.runs.min, max);
options.runs.max = max;
options.runs.max = Some(max);
}
(Some(min), Some(max)) if min > max => {
return Err(OptionsError::EmptyRunsRange);
}
(Some(min), Some(max)) => {
options.runs.min = min;
options.runs.max = max;
options.runs.max = Some(max);
}
(None, None) => {}
};