aboutsummaryrefslogtreecommitdiff
path: root/src/bytes.rs
diff options
context:
space:
mode:
authorGravatar Brad Dunbar <dunbarb2@gmail.com> 2024-04-09 08:35:54 -0400
committerGravatar GitHub <noreply@github.com> 2024-04-09 14:35:54 +0200
commite4af48633cec419e8274571d353fe166d5e23a3e (patch)
tree3ed439dd8581c5722df491d81131662dd7b93bdb /src/bytes.rs
parent0d4cc7ffed2eadfb2028bade65b9ac0b6d231fc4 (diff)
downloadbytes-e4af48633cec419e8274571d353fe166d5e23a3e.tar.gz
bytes-e4af48633cec419e8274571d353fe166d5e23a3e.tar.zst
bytes-e4af48633cec419e8274571d353fe166d5e23a3e.zip
Don't set `len` in `BytesMut::reserve` (#682)
A fundamental invariant of `reserve` is that it can extend capacity while the stored data remains the same, even if it's moved to a new allocation. As a result, `len` can never change during a call to `reserve`.
Diffstat (limited to 'src/bytes.rs')
0 files changed, 0 insertions, 0 deletions