You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the serialize and deserialize functions use different defaults than the DefaultOptions Struct. Specifically, the functions use a fixedint format, but DefaultOptions uses varint.
Confusingly, both the function documentation and the Struct documentation indicate that they use the default options.
I ran into this issue, because I am writing some code that needs to use serde::de::DeserializeSeed, which requires access to the Deserializer as a struct. However, the data may not be created with the struct, as most bincode usage seems to use the functions.
Yeah, I messed up the documentation on this one. The reason serialize and deserialize use fixedint is to maintain backwards compatibility with older versions of bincode. Closing this as a duplicate of #348
the
serialize
anddeserialize
functions use different defaults than theDefaultOptions
Struct. Specifically, the functions use afixedint
format, but DefaultOptions usesvarint
.Confusingly, both the function documentation and the Struct documentation indicate that they use the default options.
I ran into this issue, because I am writing some code that needs to use
serde::de::DeserializeSeed
, which requires access to theDeserializer
as a struct. However, the data may not be created with the struct, as mostbincode
usage seems to use the functions.Steps to reproduce:
The text was updated successfully, but these errors were encountered: