File tree Expand file tree Collapse file tree 2 files changed +16
-7
lines changed
Expand file tree Collapse file tree 2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change @@ -1456,7 +1456,10 @@ impl VirtualMachine {
14561456 pub ( crate ) fn set_exception ( & self , exc : Option < PyBaseExceptionRef > ) {
14571457 // don't be holding the RefCell guard while __del__ is called
14581458 let mut excs = self . exceptions . borrow_mut ( ) ;
1459- debug_assert ! ( !excs. stack. is_empty( ) , "set_exception called with empty exception stack" ) ;
1459+ debug_assert ! (
1460+ !excs. stack. is_empty( ) ,
1461+ "set_exception called with empty exception stack"
1462+ ) ;
14601463 if let Some ( top) = excs. stack . last_mut ( ) {
14611464 let prev = core:: mem:: replace ( top, exc) ;
14621465 drop ( excs) ;
Original file line number Diff line number Diff line change 1- use crate :: frame:: Frame ;
2- use crate :: { AsObject , PyObject , VirtualMachine } ;
3- #[ cfg( feature = "threading" ) ]
4- use crate :: builtins:: PyBaseExceptionRef ;
51#[ cfg( feature = "threading" ) ]
62use super :: FramePtr ;
73#[ cfg( feature = "threading" ) ]
4+ use crate :: builtins:: PyBaseExceptionRef ;
5+ use crate :: frame:: Frame ;
6+ use crate :: { AsObject , PyObject , VirtualMachine } ;
7+ #[ cfg( feature = "threading" ) ]
88use alloc:: sync:: Arc ;
99use core:: {
1010 cell:: { Cell , RefCell } ,
@@ -95,7 +95,10 @@ pub fn push_thread_frame(fp: FramePtr) {
9595 if let Some ( s) = slot. borrow ( ) . as_ref ( ) {
9696 s. frames . lock ( ) . push ( fp) ;
9797 } else {
98- debug_assert ! ( false , "push_thread_frame called without initialized thread slot" ) ;
98+ debug_assert ! (
99+ false ,
100+ "push_thread_frame called without initialized thread slot"
101+ ) ;
99102 }
100103 } ) ;
101104}
@@ -108,7 +111,10 @@ pub fn pop_thread_frame() {
108111 if let Some ( s) = slot. borrow ( ) . as_ref ( ) {
109112 s. frames . lock ( ) . pop ( ) ;
110113 } else {
111- debug_assert ! ( false , "pop_thread_frame called without initialized thread slot" ) ;
114+ debug_assert ! (
115+ false ,
116+ "pop_thread_frame called without initialized thread slot"
117+ ) ;
112118 }
113119 } ) ;
114120}
You can’t perform that action at this time.
0 commit comments