Compare commits

...
2 Commits
Author SHA1 Message Date
Alice RyhlandGitHub dc4fb3e8f4 chore: prepare bytes v1.7.1 (#727) 2024-08-01 22:55:24 +02:00
Alice RyhlandGitHub f488be48d0 Revert "Reuse capacity when possible in <BytesMut as Buf>::advance impl" (#726)
This reverts commit baa5053572.
2024-08-01 22:38:17 +02:00
3 changed files with 9 additions and 8 deletions
+8
View File
@@ -1,3 +1,11 @@
# 1.7.1 (August 1, 2024)
This release reverts the following change due to a regression:
- Reuse capacity when possible in `<BytesMut as Buf>::advance` impl (#698)
The revert can be found at #726.
# 1.7.0 (July 31, 2024)
### Added
+1 -1
View File
@@ -4,7 +4,7 @@ name = "bytes"
# When releasing to crates.io:
# - Update CHANGELOG.md.
# - Create "v1.x.y" git tag.
version = "1.7.0"
version = "1.7.1"
edition = "2018"
rust-version = "1.39"
license = "MIT"
-7
View File
@@ -1148,13 +1148,6 @@ impl Buf for BytesMut {
#[inline]
fn advance(&mut self, cnt: usize) {
// Advancing by the length is the same as resetting the length to 0,
// except this way we get to reuse the full capacity.
if cnt == self.remaining() {
self.clear();
return;
}
assert!(
cnt <= self.remaining(),
"cannot advance past `remaining`: {:?} <= {:?}",