File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ impl RefCount {
4444 #[ inline]
4545 pub fn safe_inc ( & self ) -> bool {
4646 self . strong
47- . fetch_update ( AcqRel , Acquire , |prev| ( prev != 0 ) . then ( || prev + 1 ) )
47+ . fetch_update ( AcqRel , Acquire , |prev| ( prev != 0 ) . then_some ( prev + 1 ) )
4848 . is_ok ( )
4949 }
5050
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ struct PyObjVTable {
7878 debug : unsafe fn ( & PyObject , & mut fmt:: Formatter ) -> fmt:: Result ,
7979}
8080unsafe fn drop_dealloc_obj < T : PyObjectPayload > ( x : * mut PyObject ) {
81- Box :: from_raw ( x as * mut PyInner < T > ) ;
81+ drop ( Box :: from_raw ( x as * mut PyInner < T > ) ) ;
8282}
8383unsafe fn debug_obj < T : PyObjectPayload > ( x : & PyObject , f : & mut fmt:: Formatter ) -> fmt:: Result {
8484 let x = & * ( x as * const PyObject as * const PyInner < T > ) ;
@@ -269,7 +269,7 @@ impl WeakRefList {
269269 }
270270
271271 unsafe fn dealloc ( ptr : NonNull < PyMutex < WeakListInner > > ) {
272- Box :: from_raw ( ptr. as_ptr ( ) ) ;
272+ drop ( Box :: from_raw ( ptr. as_ptr ( ) ) ) ;
273273 }
274274
275275 fn get_weak_references ( & self ) -> Vec < PyRef < PyWeak > > {
You can’t perform that action at this time.
0 commit comments