@@ -127,9 +127,9 @@ impl QuestionMark {
127
127
if ( Self :: result_check_and_early_return( cx, let_expr, nested_expr, Some ( ident. name) ) &&
128
128
( is_lang_ctor( cx, path1, ResultOk ) || is_lang_ctor( cx, path1, ResultErr ) ) ) ||
129
129
( Self :: option_check_and_early_return( cx, let_expr, nested_expr) &&
130
- is_lang_ctor( cx, path1, OptionSome ) ) && path_to_local_id( peel_blocks( if_then) , bind_id) ;
131
- let by_ref = matches!( annot, BindingAnnotation :: Ref | BindingAnnotation :: RefMut ) ;
130
+ is_lang_ctor( cx, path1, OptionSome ) && path_to_local_id( peel_blocks( if_then) , bind_id) ) ;
132
131
then {
132
+ let by_ref = matches!( annot, BindingAnnotation :: Ref | BindingAnnotation :: RefMut ) ;
133
133
let mut applicability = Applicability :: MachineApplicable ;
134
134
let receiver_str = snippet_with_applicability( cx, let_expr. span, ".." , & mut applicability) ;
135
135
let append_semi = Self :: is_semicolon_needed( if_then, if_else) ;
@@ -183,7 +183,7 @@ impl QuestionMark {
183
183
/// ```
184
184
fn is_semicolon_needed ( if_then : & Expr < ' _ > , if_else : Option < & ' _ Expr < ' _ > > ) -> bool {
185
185
let if_then_kind = & peel_blocks_with_stmt ( if_then) . kind ;
186
- let if_then_is_ret_stmt = matches ! ( if_then_kind, ExprKind :: Ret ( _ ) ) ;
186
+ let if_then_is_ret_stmt = matches ! ( if_then_kind, ExprKind :: Ret ( .. ) ) ;
187
187
188
188
if if_else. is_none ( ) {
189
189
return if_then_is_ret_stmt;
0 commit comments