Fix incorrect error message format for coerced parsing errors

This commit is contained in:
2025-11-02 22:10:17 +11:00
parent 6b26188990
commit 6d42221332
2 changed files with 3 additions and 2 deletions

View File

@@ -52,7 +52,8 @@ println!("{file:?} -> {out:?} (number: {number:?})",
### Changelog ### ### Changelog ###
<!-- main: --> main:
* Fixed incorrect error message format for coerced parsing errors.
v0.1.0: v0.1.0:
* Initial release. * Initial release.

View File

@@ -169,7 +169,7 @@ impl<ID: 'static> Opts<ID> {
// HACK: Ensure the string fields are set properly, because coerced // HACK: Ensure the string fields are set properly, because coerced
// ParseIntError/ParseFloatError will have the string fields blanked. // ParseIntError/ParseFloatError will have the string fields blanked.
Err(ParseError::ArgumentError("", "", kind)) Err(ParseError::ArgumentError("", "", kind))
=> Err(ParseError::ArgumentError(name, token, kind)), => Err(ParseError::ArgumentError(name, value, kind)),
Err(err) => Err(err), Err(err) => Err(err),
Ok(ctl) => Ok(ctl), Ok(ctl) => Ok(ctl),
} }