@@ -603,7 +603,9 @@ pub fn trait_ref_of_method<'tcx>(cx: &LateContext<'tcx>, def_id: LocalDefId) ->
603
603
if parent_impl != CRATE_DEF_ID ;
604
604
if let hir:: Node :: Item ( item) = cx. tcx. hir( ) . get_by_def_id( parent_impl) ;
605
605
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
+ }
607
609
}
608
610
None
609
611
}
@@ -713,12 +715,7 @@ pub fn is_default_equivalent_call(cx: &LateContext<'_>, repl_func: &Expr<'_>) ->
713
715
if let Some ( repl_def_id) = cx. qpath_res( repl_func_qpath, repl_func. hir_id) . opt_def_id( ) ;
714
716
if is_diag_trait_item( cx, repl_def_id, sym:: Default )
715
717
|| 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 }
722
719
}
723
720
}
724
721
@@ -1553,8 +1550,7 @@ pub fn is_try<'tcx>(cx: &LateContext<'_>, expr: &'tcx Expr<'tcx>) -> Option<&'tc
1553
1550
if arms. len( ) == 2 ;
1554
1551
if arms[ 0 ] . guard. is_none( ) ;
1555
1552
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 ] ) ) ;
1558
1554
then {
1559
1555
return Some ( expr) ;
1560
1556
}
@@ -1644,7 +1640,7 @@ pub fn match_function_call<'tcx>(
1644
1640
if let Some ( fun_def_id) = cx. qpath_res( qpath, fun. hir_id) . opt_def_id( ) ;
1645
1641
if match_def_path( cx, fun_def_id, path) ;
1646
1642
then {
1647
- return Some ( args)
1643
+ return Some ( args) ;
1648
1644
}
1649
1645
} ;
1650
1646
None
0 commit comments