Skip to content
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

Matrix serialization is length-delimited but deserialization isn't #138

Closed
danielkeller opened this issue Dec 14, 2021 · 1 comment · Fixed by #140
Closed

Matrix serialization is length-delimited but deserialization isn't #138

danielkeller opened this issue Dec 14, 2021 · 1 comment · Fixed by #140
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@danielkeller
Copy link

For example, with bincode, the following assertion fails:

let unit = Mat4::identity();
assert_eq!(
    unit,
    bincode::deserialize::<Mat4>(&bincode::serialize(&unit).unwrap()).unwrap()
);

It looks like the serializer inserts a length that the deserializer doesn't read.

@AlphaModder
Copy link
Contributor

This occurs because the Serialize impl calls serialize_seq but the Deserialize impl calls deserialize_tuple. ron is also affected. I have opened a PR #140 to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants