jonhoo / async-bincode

Asynchronous access to a bincode-encoded item stream.
Apache License 2.0
68 stars 9 forks source link

Avoid discarding capacity during read operation #22

Open vpzomtrrfrt opened 7 months ago

vpzomtrrfrt commented 7 months ago

The previous behaviour caused the target buffer length to change between calls within a single read operation, which seems wrong since the underlying read would then try to read too much into a smaller buffer

codecov-commenter commented 7 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (5bf693f) 87.7% compared to head (b1c201b) 87.6%.

Additional details and impacted files | [Files](https://app.codecov.io/gh/jonhoo/async-bincode/pull/22?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jon+Gjengset) | Coverage Δ | | |---|---|---| | [src/reader.rs](https://app.codecov.io/gh/jonhoo/async-bincode/pull/22?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jon+Gjengset#diff-c3JjL3JlYWRlci5ycw==) | `88.3% <93.3%> (+0.5%)` | :arrow_up: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/jonhoo/async-bincode/pull/22/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Jon+Gjengset)