mirror of
https://github.com/tokio-rs/bytes.git
synced 2026-08-12 00:00:14 +02:00
Fix Bytes::truncate losing the original Vec's capacity (#361)
This commit is contained in:
committed by
Carl Lerche
parent
729bc7c208
commit
e0eebde993
@@ -41,7 +41,7 @@ unsafe impl GlobalAlloc for Odd {
|
||||
};
|
||||
System.dealloc(ptr.offset(-1), new_layout);
|
||||
} else {
|
||||
System.alloc(layout);
|
||||
System.dealloc(ptr, layout);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user