Skip to content

Conversation

@tjallingt
Copy link

fixes #57

The test case is the same as from the issue.
That doesn't cover "consistency" fully but at least its a regression for this case.
More tests should be added to ensure that the same input produces a similar result (Ok/Err) across the different readers. I could write a macro for this if desired.

The fix is also a bit dubious. I'm not entirely sure what the output.len() < self.buffer.capacity() line is for. I removed it because I noticed that the issue was caused by the capacity set on the circular buffer. Expecting a vec with length of >= 8192 would fail but anything shorter would succeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

read_from_stream_buffered produces different results than other readers

1 participant