-
Notifications
You must be signed in to change notification settings - Fork 68
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
Add seriailize and deserialize usize #9
Conversation
Hmm run these pass locally:
And fail on ci doesn't seem to revelant to the change (no usize in the enum), any ideas?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine, maybe better wording in error message.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not 100% sold on adding support for usize
since someone can shoot themselves in the foot, but if you think it makes sense, I am fine with that.
As @olonho and other libs (serde, bincode, etc.) point out, this is not a hack, it serialize usize as if it were u64. It deserialize usize as if it were u64, and convert to usize. When overflow on deserialize, it return error