File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed
Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff 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 => {
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ use crate::{
1010 function:: PySetterValue ,
1111 types:: Representable ,
1212} ;
13- use rustpython_compiler_core:: bytecode;
1413use num_traits:: Zero ;
14+ use rustpython_compiler_core:: bytecode;
1515
1616pub 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
You can’t perform that action at this time.
0 commit comments