Skip to content

Commit 467c346

Browse files
Auto-format: cargo fmt --all
1 parent e320cfe commit 467c346

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

crates/vm/src/vm/mod.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff 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);

crates/vm/src/vm/thread.rs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
use crate::frame::Frame;
2-
use crate::{AsObject, PyObject, VirtualMachine};
3-
#[cfg(feature = "threading")]
4-
use crate::builtins::PyBaseExceptionRef;
51
#[cfg(feature = "threading")]
62
use 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")]
88
use alloc::sync::Arc;
99
use 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
}

0 commit comments

Comments
 (0)