We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When parsing something like: number = 1000 into a u8 I'm getting:
number = 1000
u8
error: proc-macro derive panicked = help: message: called `Result::unwrap()` on an `Err` value: Error("number too large to fit in target type")
This presumably comes from this unwrap:
unwrap
darling/core/src/from_meta.rs
Line 231 in 78f3d11
Quoting from the docs:
... darling prefers not to fail on the first error it encounters, instead doing as much work as it can, accumulating errors into a single report.
It would be great to replace the unwrap with the usual error handling
The text was updated successfully, but these errors were encountered:
Agreed; that should be updated. Not sure why I currently have it panicking.
Sorry, something went wrong.
Propagate Err from number parsing
dfa6302
Previously, an unwrap was used. Propagating the error will preserve spans and improve the error message. This fixes #289
195eccf
Successfully merging a pull request may close this issue.
When parsing something like:
number = 1000
into au8
I'm getting:This presumably comes from this
unwrap
:darling/core/src/from_meta.rs
Line 231 in 78f3d11
Quoting from the docs:
It would be great to replace the
unwrap
with the usual error handlingThe text was updated successfully, but these errors were encountered: