Fix amortized asymptotics of BytesMut (#555)

Signed-off-by: Jiahao XU <[email protected]>
Co-authored-by: Frank Steffahn <[email protected]>
This commit is contained in:
Jiahao XU
2022-07-19 13:17:53 +02:00
committed by GitHub
co-authored by Frank Steffahn
parent cd188cbd67
commit 7553a67be2
2 changed files with 67 additions and 15 deletions
+1 -1
View File
@@ -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