Skip to content

Commit 5c3dd36

Browse files
Auto-format: cargo fmt --all
1 parent c706e52 commit 5c3dd36

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

crates/vm/src/frame.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,7 +2460,11 @@ impl ExecutingFrame<'_> {
24602460
}
24612461
Instruction::YieldValue { arg: oparg } => {
24622462
debug_assert!(
2463-
self.state.stack.iter().flatten().all(|sr| !sr.is_borrowed()),
2463+
self.state
2464+
.stack
2465+
.iter()
2466+
.flatten()
2467+
.all(|sr| !sr.is_borrowed()),
24642468
"borrowed refs on stack at yield point"
24652469
);
24662470
let value = self.pop_value();
@@ -4272,8 +4276,7 @@ impl ExecutingFrame<'_> {
42724276
);
42734277
}
42744278
self.state.stack.drain(stack_len - count..).map(|obj| {
4275-
expect_unchecked(obj, "pop_multiple but null found. This is a compiler bug.")
4276-
.to_pyobj()
4279+
expect_unchecked(obj, "pop_multiple but null found. This is a compiler bug.").to_pyobj()
42774280
})
42784281
}
42794282

crates/vm/src/object/core.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1426,7 +1426,10 @@ impl PyStackRef {
14261426
pub fn new_owned(obj: PyObjectRef) -> Self {
14271427
let ptr = obj.into_raw();
14281428
let bits = ptr.as_ptr() as usize;
1429-
debug_assert!(bits & STACKREF_BORROW_TAG == 0, "PyObject pointer must be aligned");
1429+
debug_assert!(
1430+
bits & STACKREF_BORROW_TAG == 0,
1431+
"PyObject pointer must be aligned"
1432+
);
14301433
Self { bits }
14311434
}
14321435

crates/vm/src/object/traverse.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ use core::ptr::NonNull;
33
use rustpython_common::lock::{PyMutex, PyRwLock};
44

55
use crate::{
6-
AsObject, PyObject, PyObjectRef, PyRef, PyStackRef, function::Either,
7-
object::PyObjectPayload,
6+
AsObject, PyObject, PyObjectRef, PyRef, PyStackRef, function::Either, object::PyObjectPayload,
87
};
98

109
pub type TraverseFn<'a> = dyn FnMut(&PyObject) + 'a;

0 commit comments

Comments
 (0)