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

Deserializer::bytes_read always returns 0 because read field never updated #142

Closed
SuperFluffy opened this issue Mar 22, 2017 · 0 comments
Closed

Comments

@SuperFluffy
Copy link

@SuperFluffy SuperFluffy commented Mar 22, 2017

As per the suggestion of @dtolnay and @TyOverby on irc.mozilla#rust, I meant to use Deserializer::bytes_read to ensure that the Deserializer reads to the end of my file, but I noticed that the function always returns 0. Looking through the repository, it looks like Deserializer's read field is only ever used twice: when initializing it to 0 in Deserializer::new and when returning it via bytes_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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.