Skip to content

Commit d0d1d1e

Browse files
Auto-format: cargo fmt --all
1 parent f17b4da commit d0d1d1e

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

crates/vm/src/builtins/code.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -958,12 +958,11 @@ impl PyCode {
958958
let next_op = instructions
959959
.get(i + 1)
960960
.map(|u| u.op.to_base().unwrap_or(u.op));
961-
let fallthrough =
962-
if matches!(next_op, Some(Instruction::NotTaken)) {
963-
(i + 2) * 2
964-
} else {
965-
(i + 1) * 2
966-
};
961+
let fallthrough = if matches!(next_op, Some(Instruction::NotTaken)) {
962+
(i + 2) * 2
963+
} else {
964+
(i + 1) * 2
965+
};
967966
(i * 2, fallthrough, oparg as usize * 2)
968967
}
969968
Instruction::EndAsyncFor => {

crates/vm/src/builtins/frame.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ use crate::{
1010
function::PySetterValue,
1111
types::Representable,
1212
};
13-
use rustpython_compiler_core::bytecode;
1413
use num_traits::Zero;
14+
use rustpython_compiler_core::bytecode;
1515

1616
pub fn init(context: &Context) {
1717
Frame::extend_class(context, context.types.frame_type);
@@ -124,15 +124,13 @@ impl Frame {
124124
let in_target = (target_idx as u32) >= entry.start && (target_idx as u32) < entry.end;
125125
// Don't jump into a handler range we're not already in
126126
if !in_source && in_target {
127-
return Err(vm.new_value_error(
128-
"can't jump into an exception handler".to_owned(),
129-
));
127+
return Err(vm.new_value_error("can't jump into an exception handler".to_owned()));
130128
}
131129
// Don't jump to the handler target itself
132130
if target_idx as u32 == entry.target {
133-
return Err(vm.new_value_error(
134-
"can't jump to an exception handler target".to_owned(),
135-
));
131+
return Err(
132+
vm.new_value_error("can't jump to an exception handler target".to_owned())
133+
);
136134
}
137135
}
138136

0 commit comments

Comments
 (0)