option_parser: Improve error message to indicate conversion error

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-08-08 15:00:06 +01:00
parent ea58d2f68a
commit 19957d4fa4

View File

@ -31,7 +31,7 @@ impl fmt::Display for OptionParserError {
OptionParserError::UnknownOption(s) => write!(f, "unknown option: {}", s),
OptionParserError::InvalidSyntax(s) => write!(f, "invalid syntax:{}", s),
OptionParserError::Conversion(field, value) => {
write!(f, "unable to parse {} for {}", value, field)
write!(f, "unable to convert {} for {}", value, field)
}
}
}