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
Before returning the error, the self.content variable contains Content::ByteBuf(b"Request") instead of a string.
Applying the below patch in that function seems to resolve the issue, but I'm not too familiar with the serde code so please let me know if you think this is or isn't an adequate solution (full diff here).
- s @ Content::String(_) | s @ Content::Str(_) => (s, None),+ s @ Content::String(_)+ | s @ Content::Str(_)+ | s @ Content::ByteBuf(_)+ | s @ Content::Bytes(_) => (s, None),
For posterity, adjacently tagged enums worked OK in serde-bencode with serde v1.0.180 but broke with >=v1.0.181.
The text was updated successfully, but these errors were encountered:
I'm using the
bencode
format which doesn't differentiate between strings and bytes.In particular I'm working with
serde-bencode
which currently has a test ser_de_flattened_adjacently_tagged_enum ignored due of this issue.The test fails with the error
InvalidType("Invalid Type: byte array (expected: string or map)")
coming from serde/ContentDeserializer::deserialize_enum
.Before returning the error, the
self.content
variable containsContent::ByteBuf(b"Request")
instead of a string.Applying the below patch in that function seems to resolve the issue, but I'm not too familiar with the
serde
code so please let me know if you think this is or isn't an adequate solution (full diff here).For posterity, adjacently tagged enums worked OK in
serde-bencode
withserde
v1.0.180 but broke with >=v1.0.181.The text was updated successfully, but these errors were encountered: