diff --git a/skiplist/src/arena.rs b/skiplist/src/arena.rs index 5f03bfe1..10c7e6cf 100644 --- a/skiplist/src/arena.rs +++ b/skiplist/src/arena.rs @@ -11,7 +11,9 @@ struct ArenaCore { impl Drop for ArenaCore { fn drop(&mut self) { unsafe { - Vec::from_raw_parts(self.ptr, 0, self.cap); + let ptr = self.ptr as *mut u64; + let cap = self.cap / 8; + Vec::from_raw_parts(ptr, 0, cap); } } }