-
Notifications
You must be signed in to change notification settings - Fork 24
Add support for MessagePack timestamp extension type #393
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
Conversation
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'm no pro in Rust, but everything looks good to me. One question though: why do we use exactly 128 as an intermediate value for an extension tag (mapped to -1 in serialize_newtype_variant)? Probably tag: i8 is not an ideal type choice
That is because extensions are serialized using serialize_newtype_variant with the tag given as the |
I mean that it could be possible to change type of But according to this logic it would be also possible to avoid using value 128 as an alias for -1 extension type by directly passing 255 to |
and derives the tag from the variant index. It is not pretty, but other alternatives are worse in that they require more boilerplate code. |
Ok, I see it now. Thank you for clarifying |
Signed-off-by: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Signed-off-by: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
Signed-off-by: Emanuele Giaquinta <emanuele.giaquinta@gmail.com>
No description provided.