diff options
author | Melody Horn <melody@boringcactus.com> | 2024-11-10 16:02:48 -0700 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2024-11-10 16:02:48 -0700 |
commit | 7029372c9fada6316852915765cc0d763be3c63c (patch) | |
tree | d649d79de0b83b84637d85595fd6de2cfa38f17c /src/makefile/command_line.rs | |
parent | e9080b515d86b9f39e97d4c8e1a157dfa4ba86f3 (diff) | |
download | makers-7029372c9fada6316852915765cc0d763be3c63c.tar.gz makers-7029372c9fada6316852915765cc0d763be3c63c.zip |
clippy moment
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 |