aboutsummaryrefslogtreecommitdiff
path: root/src/bytes.rs
diff options
context:
space:
mode:
authorGravatar Jiahao XU <Jiahao_XU@outlook.com> 2022-07-19 21:17:53 +1000
committerGravatar GitHub <noreply@github.com> 2022-07-19 13:17:53 +0200
commit7553a67be2b9d7ef2ac42dbcd38fd8365ee64cb5 (patch)
treee06ab7ac9bc6388fda4b6bd74b9582dde57df217 /src/bytes.rs
parentcd188cbd67c073128fdc339be8d5d67436d76f36 (diff)
downloadbytes-7553a67be2b9d7ef2ac42dbcd38fd8365ee64cb5.tar.gz
bytes-7553a67be2b9d7ef2ac42dbcd38fd8365ee64cb5.tar.zst
bytes-7553a67be2b9d7ef2ac42dbcd38fd8365ee64cb5.zip
Fix amortized asymptotics of `BytesMut` (#555)
Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> Co-authored-by: Frank Steffahn <frank.steffahn@stu.uni-kiel.de>
Diffstat (limited to 'src/bytes.rs')
-rw-r--r--src/bytes.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bytes.rs b/src/bytes.rs
index 948b10e..f8d3ce3 100644
--- a/src/bytes.rs
+++ b/src/bytes.rs
@@ -1190,7 +1190,7 @@ unsafe fn release_shared(ptr: *mut Shared) {
(*ptr).ref_cnt.load(Ordering::Acquire);
// Drop the data
- Box::from_raw(ptr);
+ drop(Box::from_raw(ptr));
}
// Ideally we would always use this version of `ptr_map` since it is strict