mirror of
https://github.com/gay-pizza/jaarg.git
synced 2025-12-18 23:10:17 +00:00
Fix incorrect error message format for coerced parsing errors
This commit is contained in:
@@ -52,7 +52,8 @@ println!("{file:?} -> {out:?} (number: {number:?})",
|
||||
|
||||
### Changelog ###
|
||||
|
||||
<!-- main: -->
|
||||
main:
|
||||
* Fixed incorrect error message format for coerced parsing errors.
|
||||
|
||||
v0.1.0:
|
||||
* Initial release.
|
||||
|
||||
@@ -169,7 +169,7 @@ impl<ID: 'static> Opts<ID> {
|
||||
// HACK: Ensure the string fields are set properly, because coerced
|
||||
// ParseIntError/ParseFloatError will have the string fields blanked.
|
||||
Err(ParseError::ArgumentError("", "", kind))
|
||||
=> Err(ParseError::ArgumentError(name, token, kind)),
|
||||
=> Err(ParseError::ArgumentError(name, value, kind)),
|
||||
Err(err) => Err(err),
|
||||
Ok(ctl) => Ok(ctl),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user