docs
This commit is contained in:
parent
353250b058
commit
4bcf581a46
|
@ -137,9 +137,9 @@ impl Drop for Object {
|
||||||
drop(obj);
|
drop(obj);
|
||||||
|
|
||||||
// SAFETY:
|
// SAFETY:
|
||||||
// We took `ptr` and `len` from the vec earlier,
|
// We took `ptr` and `len` from the vec earlier (and ensured `len` == `cap`),
|
||||||
// then leaked it to get a stic reference to it which was only held within `self.inner`,
|
// then leaked it to get a static reference to it
|
||||||
// which has been dropped above.
|
// which was only held within `self.inner`, which has been dropped above.
|
||||||
unsafe {
|
unsafe {
|
||||||
let vec = Vec::from_raw_parts(self.ptr, self.len, self.len);
|
let vec = Vec::from_raw_parts(self.ptr, self.len, self.len);
|
||||||
drop(vec);
|
drop(vec);
|
||||||
|
|
Loading…
Reference in a new issue