error.rs (hyperfine-1.14.0) | : | error.rs (hyperfine-1.15.0) | ||
---|---|---|---|---|
use std::num::{self, ParseIntError}; | use std::num::{self, ParseFloatError, ParseIntError}; | |||
use rust_decimal::Error as DecimalError; | use rust_decimal::Error as DecimalError; | |||
use thiserror::Error; | use thiserror::Error; | |||
#[derive(Debug, Error)] | #[derive(Debug, Error)] | |||
pub enum ParameterScanError { | pub enum ParameterScanError { | |||
#[error("Error while parsing parameter scan arguments ({0})")] | #[error("Error while parsing parameter scan arguments ({0})")] | |||
ParseIntError(num::ParseIntError), | ParseIntError(num::ParseIntError), | |||
#[error("Error while parsing parameter scan arguments ({0})")] | #[error("Error while parsing parameter scan arguments ({0})")] | |||
ParseDecimalError(DecimalError), | ParseDecimalError(DecimalError), | |||
skipping to change at line 46 | skipping to change at line 46 | |||
#[derive(Debug, Error)] | #[derive(Debug, Error)] | |||
pub enum OptionsError<'a> { | pub enum OptionsError<'a> { | |||
#[error( | #[error( | |||
"Conflicting requirements for the number of runs (empty range, min is la rger than max)" | "Conflicting requirements for the number of runs (empty range, min is la rger than max)" | |||
)] | )] | |||
EmptyRunsRange, | EmptyRunsRange, | |||
#[error("Too many --command-name options: Expected {0} at most")] | #[error("Too many --command-name options: Expected {0} at most")] | |||
TooManyCommandNames(usize), | TooManyCommandNames(usize), | |||
#[error("'--command-name' has been specified {0} times. It has to appear exa ctly once, or exactly {1} times (number of benchmarks)")] | #[error("'--command-name' has been specified {0} times. It has to appear exa ctly once, or exactly {1} times (number of benchmarks)")] | |||
UnexpectedCommandNameCount(usize, usize), | UnexpectedCommandNameCount(usize, usize), | |||
#[error("Could not read numeric argument to '--{0}': {1}")] | #[error("Could not read numeric integer argument to '--{0}': {1}")] | |||
NumericParsingError(&'a str, ParseIntError), | IntParsingError(&'a str, ParseIntError), | |||
#[error("Could not read numeric floating point argument to '--{0}': {1}")] | ||||
FloatParsingError(&'a str, ParseFloatError), | ||||
#[error("An empty command has been specified for the '--shell <command>' opt ion")] | #[error("An empty command has been specified for the '--shell <command>' opt ion")] | |||
EmptyShell, | EmptyShell, | |||
#[error("Failed to parse '--shell <command>' expression as command line: {0} ")] | #[error("Failed to parse '--shell <command>' expression as command line: {0} ")] | |||
ShellParseError(shell_words::ParseError), | ShellParseError(shell_words::ParseError), | |||
#[error("Unknown output policy '{0}'. Use './{0}' to output to a file named '{0}'.")] | #[error("Unknown output policy '{0}'. Use './{0}' to output to a file named '{0}'.")] | |||
UnknownOutputPolicy(String), | UnknownOutputPolicy(String), | |||
} | } | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 5 lines changed or added |