diff options
Diffstat (limited to 'src/makefile/command_line.rs')
-rw-r--r-- | src/makefile/command_line.rs | 9 |
1 files changed, 4 insertions, 5 deletions
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 |