-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
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
[uint, primitive-types]: Parsing from string is not what is expected #643
Comments
We have Would you expect |
Yes exactly. |
That might be a better default, however, I don't know how many crates depend on the current behavior and it won't be checked at compile time. So I'm very hesitant to change it now. Maybe we could improve documentation instead to make it clear. |
When deriving I would suggest the feature flag would allow number types to be parsed from decimal strings and |
I can't think of a precedent off top of my head where a behavior of an existing function could be changed via a feature flag without changing its API. But that sounds reasonable to me to add a feature disabled by default that does that. |
I was using
U256
as an argument withclap
and I found out that my input was parsed as hexadecimal number.I was expecting the following, however the first assert fails because
num
is 39.The text was updated successfully, but these errors were encountered: