aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/command_line.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2024-11-10 16:02:48 -0700
committerMelody Horn <melody@boringcactus.com>2024-11-10 16:02:48 -0700
commit7029372c9fada6316852915765cc0d763be3c63c (patch)
treed649d79de0b83b84637d85595fd6de2cfa38f17c /src/makefile/command_line.rs
parente9080b515d86b9f39e97d4c8e1a157dfa4ba86f3 (diff)
downloadmakers-7029372c9fada6316852915765cc0d763be3c63c.tar.gz
makers-7029372c9fada6316852915765cc0d763be3c63c.zip
clippy moment
Diffstat (limited to 'src/makefile/command_line.rs')
-rw-r--r--src/makefile/command_line.rs9
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