@@ -336,15 +336,15 @@ impl<'tcx> LateLintPass<'tcx> for Attributes {
336336 return ;
337337 }
338338 if let Some ( lint_list) = & attr. meta_item_list ( ) {
339- if attr. ident ( ) . map_or ( false , |ident| is_lint_level ( ident. name ) ) {
339+ if attr. ident ( ) . is_some_and ( |ident| is_lint_level ( ident. name ) ) {
340340 for lint in lint_list {
341341 match item. kind {
342342 ItemKind :: Use ( ..) => {
343343 if is_word ( lint, sym:: unused_imports)
344344 || is_word ( lint, sym:: deprecated)
345345 || is_word ( lint, sym ! ( unreachable_pub) )
346346 || is_word ( lint, sym ! ( unused) )
347- || extract_clippy_lint ( lint) . map_or ( false , |s| {
347+ || extract_clippy_lint ( lint) . is_some_and ( |s| {
348348 matches ! (
349349 s. as_str( ) ,
350350 "wildcard_imports" | "enum_glob_use" | "redundant_pub_crate" ,
@@ -493,7 +493,7 @@ fn is_relevant_block(cx: &LateContext<'_>, typeck_results: &ty::TypeckResults<'_
493493 block
494494 . expr
495495 . as_ref ( )
496- . map_or ( false , |e| is_relevant_expr ( cx, typeck_results, e) ) ,
496+ . is_some_and ( |e| is_relevant_expr ( cx, typeck_results, e) ) ,
497497 |stmt| match & stmt. kind {
498498 StmtKind :: Local ( _) => true ,
499499 StmtKind :: Expr ( expr) | StmtKind :: Semi ( expr) => is_relevant_expr ( cx, typeck_results, expr) ,
@@ -503,7 +503,7 @@ fn is_relevant_block(cx: &LateContext<'_>, typeck_results: &ty::TypeckResults<'_
503503}
504504
505505fn is_relevant_expr ( cx : & LateContext < ' _ > , typeck_results : & ty:: TypeckResults < ' _ > , expr : & Expr < ' _ > ) -> bool {
506- if macro_backtrace ( expr. span ) . last ( ) . map_or ( false , |macro_call| {
506+ if macro_backtrace ( expr. span ) . last ( ) . is_some_and ( |macro_call| {
507507 is_panic ( cx, macro_call. def_id ) || cx. tcx . item_name ( macro_call. def_id ) == sym:: unreachable
508508 } ) {
509509 return false ;
0 commit comments