From 470ff2466a67aad8c274563a2a26046e09e5e93a Mon Sep 17 00:00:00 2001 From: philogy Date: Mon, 18 Nov 2024 20:05:07 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A5=A2=20Clippy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/analysis/src/lib.rs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/crates/analysis/src/lib.rs b/crates/analysis/src/lib.rs index a40be0f..a7d6ced 100644 --- a/crates/analysis/src/lib.rs +++ b/crates/analysis/src/lib.rs @@ -308,15 +308,10 @@ impl<'a, 'src, 'ast: 'src, E: FnMut(AnalysisError<'ast, 'src>)> MacroAnalysis<'a }); return; } - if self - .global_defs - .get(code_ref.ident()) - .map_or(false, |defs| { - defs.iter().any( - |def| matches!(def, Definition::Macro(m) if m.args.0.len() > 0), - ) - }) - { + if self.global_defs.get(code_ref.ident()).is_some_and(|defs| { + defs.iter() + .any(|def| matches!(def, Definition::Macro(m) if m.args.0.len() > 0)) + }) { self.emit(AnalysisError::NotYetSupported { intent: "code introspection for macros with arguments".to_owned(), span: code_ref.1,