This repository has been archived by the owner on Sep 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 192
toml::from_str can not parse valid u64 integer. #256
Comments
Thanks for the report! This is due to the fact that integers are signed when stored, but if you use Serde to deserialize into a |
Thanks. |
It looks like integer deserialization always uses an i64 even if not deserializing to toml::Value. This is a bug. https://github.com/alexcrichton/toml-rs/blob/0.4.6/src/de.rs#L815 |
robbert-vdh
added a commit
to robbert-vdh/yabridge
that referenced
this issue
Jul 27, 2020
The parser parses everything as signed integers so the configuration file will fail to parse large numbers that don't fit in an i64. toml-rs/toml-rs#256
This was referenced Oct 7, 2021
Are there any plans or WIP to solve this issue? Maybe I can help craft a patch. |
Maintenance of this crate has moved to the https://github.com/toml-rs/toml repo. As a heads up, we plan to move Closing this out. If this is still a problem, feel free to recreate this issue in the new repo. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Here is the test code :
Here is the result.
see, 10000000000000000000 is less than u64 max: 18446744073709551615
Is this a bug or not?
The text was updated successfully, but these errors were encountered: