We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34e09a8 commit 73bd296Copy full SHA for 73bd296
vm/src/object/core.rs
@@ -78,7 +78,7 @@ struct PyObjVTable {
78
debug: unsafe fn(&PyObject, &mut fmt::Formatter) -> fmt::Result,
79
}
80
unsafe fn drop_dealloc_obj<T: PyObjectPayload>(x: *mut PyObject) {
81
- Box::from_raw(x as *mut PyInner<T>);
+ drop(Box::from_raw(x as *mut PyInner<T>));
82
83
unsafe fn debug_obj<T: PyObjectPayload>(x: &PyObject, f: &mut fmt::Formatter) -> fmt::Result {
84
let x = &*(x as *const PyObject as *const PyInner<T>);
@@ -269,7 +269,7 @@ impl WeakRefList {
269
270
271
unsafe fn dealloc(ptr: NonNull<PyMutex<WeakListInner>>) {
272
- Box::from_raw(ptr.as_ptr());
+ drop(Box::from_raw(ptr.as_ptr()));
273
274
275
fn get_weak_references(&self) -> Vec<PyRef<PyWeak>> {
0 commit comments