mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-11 00:00:23 +02:00
- This fixes #25 and fixes #26. - Move the mark state into a 'Mark' enum. - Store both 'pos' and 'len' inside the mark because both are needed to distinguish between full/empty states. This fixes 'reset' setting 'len' to zero when the buffer was full when marked. - Clear the mark when the length of the marked input range exceeds the capacity. Fixes bugs with the mark not being cleared correctly on writes. - Add test cases.