Update error message

This commit is contained in:
sharkdp authored and David Peter committed 2019-10-13 15:11:39 +02:00
1 parent d1cd30b2a3
commit 33591d1433
1 file changed
+3 -4
+3 -4
View File
@@ -33,12 +33,11 @@ fn run(commands: &[Command<'_>], options: &HyperfineOptions) -> io::Result<Vec<B
let mut timing_results = vec![];
// Check if preparation command is equal to command length or should be mentioned only once
if let Some(preparation_command) = &options.preparation_command {
if commands.len() != preparation_command.len() && preparation_command.len() > 1 {
if preparation_command.len() > 1 && commands.len() != preparation_command.len() {
error(
"--prepare option should be provided only 1 time or N times equal to number of \
commands to benchmark",
"The '--prepare' option has to be provided just once or N times, where N is the \
number of benchmark commands.",
);
}
}