@@ -3,7 +3,7 @@ use clippy_utils::diagnostics::span_lint_and_sugg;
33use clippy_utils:: source:: { indent_of, reindent_multiline, snippet_opt} ;
44use clippy_utils:: ty:: is_type_diagnostic_item;
55use clippy_utils:: usage:: contains_return_break_continue_macro;
6- use clippy_utils:: { in_constant, match_qpath, path_to_local_id, sugg} ;
6+ use clippy_utils:: { in_constant, match_qpath, path_to_local_id, paths , sugg} ;
77use if_chain:: if_chain;
88use rustc_errors:: Applicability ;
99use rustc_hir:: { Arm , Expr , ExprKind , Pat , PatKind } ;
@@ -75,16 +75,16 @@ fn lint_manual_unwrap_or<'tcx>(cx: &LateContext<'tcx>, expr: &'tcx Expr<'tcx>) {
7575 if let Some ( ( idx, or_arm) ) = arms. iter( ) . enumerate( ) . find( |( _, arm) |
7676 match arm. pat. kind {
7777 PatKind :: Path ( ref some_qpath) =>
78- match_qpath( some_qpath, & clippy_utils :: paths:: OPTION_NONE ) ,
78+ match_qpath( some_qpath, & paths:: OPTION_NONE ) ,
7979 PatKind :: TupleStruct ( ref err_qpath, & [ Pat { kind: PatKind :: Wild , .. } ] , _) =>
80- match_qpath( err_qpath, & clippy_utils :: paths:: RESULT_ERR ) ,
80+ match_qpath( err_qpath, & paths:: RESULT_ERR ) ,
8181 _ => false ,
8282 }
8383 ) ;
8484 let unwrap_arm = & arms[ 1 - idx] ;
8585 if let PatKind :: TupleStruct ( ref unwrap_qpath, & [ unwrap_pat] , _) = unwrap_arm. pat. kind;
86- if match_qpath( unwrap_qpath, & clippy_utils :: paths:: OPTION_SOME )
87- || match_qpath( unwrap_qpath, & clippy_utils :: paths:: RESULT_OK ) ;
86+ if match_qpath( unwrap_qpath, & paths:: OPTION_SOME )
87+ || match_qpath( unwrap_qpath, & paths:: RESULT_OK ) ;
8888 if let PatKind :: Binding ( _, binding_hir_id, ..) = unwrap_pat. kind;
8989 if path_to_local_id( unwrap_arm. body, binding_hir_id) ;
9090 if !contains_return_break_continue_macro( or_arm. body) ;
0 commit comments