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
To reproduce (num-format v0.4.4 + bincode v1.3.3):
fnmain(){// Create an empty `Buffer`.letmut buf = num_format::Buffer::new();// Serialize to bytes.let ser:Vec<u8> = bincode::serialize(&buf).unwrap();// Attempt to deserialize. This panics.let de: num_format::Buffer = bincode::deserialize(&ser).unwrap();}
Error message:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:Custom("invalid type: byte array, expected bytes of maximum length 191")', src/main.rs:7:70
Regular formats (JSON, TOML, etc) will (de)serialize correctly, so I believe it has something to do with the binary formats and the custom serde implementation on Buffer.
The text was updated successfully, but these errors were encountered:
The
Buffer
type will always fail to deserialize when using it withserde
and binary formats, the ones I've tested:bincode
messagepack
BSON
postcard
To reproduce (
num-format v0.4.4
+bincode v1.3.3
):Error message:
Culprit code is most likely here.
Regular formats (
JSON
,TOML
, etc) will (de)serialize correctly, so I believe it has something to do with the binary formats and the customserde
implementation onBuffer
.The text was updated successfully, but these errors were encountered: