From 7029372c9fada6316852915765cc0d763be3c63c Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Sun, 10 Nov 2024 16:02:48 -0700 Subject: clippy moment --- src/makefile/command_line.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/makefile/command_line.rs') diff --git a/src/makefile/command_line.rs b/src/makefile/command_line.rs index 6a45c18..ae6c9e9 100644 --- a/src/makefile/command_line.rs +++ b/src/makefile/command_line.rs @@ -94,14 +94,13 @@ impl CommandLine { #[cfg(feature = "full")] { let is_just_one_macro_expansion = self.execution_line.tokens().count() == 1 - && self.execution_line.tokens().all(|x| match x { - Token::MacroExpansion { .. } => true, - Token::FunctionCall { .. } => true, - _ => false, + && self.execution_line.tokens().all(|x| { + matches!(x, Token::MacroExpansion { .. } | Token::FunctionCall { .. }) }); // unfortunately, if we had a multiline macro somewhere with non-escaped newlines, now we have to run each of them as separate lines lazy_static! { - static ref UNESCAPED_NEWLINE: Regex = Regex::new(r"([^\\])\n").unwrap(); + static ref UNESCAPED_NEWLINE: Regex = #[allow(clippy::unwrap_used)] + Regex::new(r"([^\\])\n").unwrap(); } if is_just_one_macro_expansion && UNESCAPED_NEWLINE.is_match(&execution_line) { let lines = UNESCAPED_NEWLINE -- cgit v1.2.3