@@ -603,7 +603,9 @@ pub fn trait_ref_of_method<'tcx>(cx: &LateContext<'tcx>, def_id: LocalDefId) ->
603603 if parent_impl != CRATE_DEF_ID ;
604604 if let hir:: Node :: Item ( item) = cx. tcx. hir( ) . get_by_def_id( parent_impl) ;
605605 if let hir:: ItemKind :: Impl ( impl_) = & item. kind;
606- then { return impl_. of_trait. as_ref( ) ; }
606+ then {
607+ return impl_. of_trait. as_ref( ) ;
608+ }
607609 }
608610 None
609611}
@@ -713,12 +715,7 @@ pub fn is_default_equivalent_call(cx: &LateContext<'_>, repl_func: &Expr<'_>) ->
713715 if let Some ( repl_def_id) = cx. qpath_res( repl_func_qpath, repl_func. hir_id) . opt_def_id( ) ;
714716 if is_diag_trait_item( cx, repl_def_id, sym:: Default )
715717 || is_default_equivalent_ctor( cx, repl_def_id, repl_func_qpath) ;
716- then {
717- true
718- }
719- else {
720- false
721- }
718+ then { true } else { false }
722719 }
723720}
724721
@@ -1553,8 +1550,7 @@ pub fn is_try<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'tcx>) -> Option<&'tc
15531550 if arms. len( ) == 2 ;
15541551 if arms[ 0 ] . guard. is_none( ) ;
15551552 if arms[ 1 ] . guard. is_none( ) ;
1556- if ( is_ok( cx, & arms[ 0 ] ) && is_err( cx, & arms[ 1 ] ) ) ||
1557- ( is_ok( cx, & arms[ 1 ] ) && is_err( cx, & arms[ 0 ] ) ) ;
1553+ if ( is_ok( cx, & arms[ 0 ] ) && is_err( cx, & arms[ 1 ] ) ) || ( is_ok( cx, & arms[ 1 ] ) && is_err( cx, & arms[ 0 ] ) ) ;
15581554 then {
15591555 return Some ( expr) ;
15601556 }
@@ -1644,7 +1640,7 @@ pub fn match_function_call<'tcx>(
16441640 if let Some ( fun_def_id) = cx. qpath_res( qpath, fun. hir_id) . opt_def_id( ) ;
16451641 if match_def_path( cx, fun_def_id, path) ;
16461642 then {
1647- return Some ( args)
1643+ return Some ( args) ;
16481644 }
16491645 } ;
16501646 None
0 commit comments