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
I'm running into an issue when deserializing from a reader. When reading the bytes into a slice first, and deserialzing that, it's working. We're serializing a struct with 3 fields, and the parts deserialize correctly with deserialize_from().
I just ran into the same issue deserializing bytes. Here's an example, which works with bincode::derserialize but fails with bincode::deserialize_with:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:Custom("invalid type: byte array, expected a borrowed byte array")', src/main.rs:30:56
Seems like an issue with visit_bytes() being buggy for IoReader?
Hi,
I'm running into an issue when deserializing from a reader. When reading the bytes into a slice first, and deserialzing that, it's working. We're serializing a struct with 3 fields, and the parts deserialize correctly with
deserialize_from()
.Reproduction code: https://github.com/joske/snarkVM/blob/a43dfaa9dd7f45a025050253ac149769de37d207/console/account/src/signature/serialize.rs#L89
This fails with:
Error: invalid type: byte array, expected a valid signature
Working code with slice: https://github.com/joske/snarkVM/blob/a43dfaa9dd7f45a025050253ac149769de37d207/console/account/src/signature/serialize.rs#L101
This is with bincode 1.3.3. I've tried playing with the
Options
but it doesn't make any difference.The text was updated successfully, but these errors were encountered: