Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDeserializer::bytes_read always returns 0 because read field never updated #142
Comments
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As per the suggestion of @dtolnay and @TyOverby on irc.mozilla#rust, I meant to use
Deserializer::bytes_readto ensure that theDeserializerreads to the end of my file, but I noticed that the function always returns0. Looking through the repository, it looks likeDeserializer'sreadfield is only ever used twice: when initializing it to0inDeserializer::newand when returning it viabytes_read.It looks like the field is otherwise not updated at any single time during the deserialization process (as quickly checked by grepping through all files in the repository).