aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/mod.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-27 17:23:12 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-27 17:23:12 -0600
commit7e998f46d5a7067bc921f1038e914f47bc1607ab (patch)
tree8c9f593a09c4dc2974ddf78dca07a28dbef7ded9 /src/makefile/mod.rs
parentd790f408294a7426460339a477026fd6d4400286 (diff)
downloadmakers-7e998f46d5a7067bc921f1038e914f47bc1607ab.tar.gz
makers-7e998f46d5a7067bc921f1038e914f47bc1607ab.zip
a couple more little things
Diffstat (limited to 'src/makefile/mod.rs')
-rw-r--r--src/makefile/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/makefile/mod.rs b/src/makefile/mod.rs
index d57bbf4..34dac04 100644
--- a/src/makefile/mod.rs
+++ b/src/makefile/mod.rs
@@ -547,8 +547,9 @@ impl<'a> Makefile<'a> {
} else {
self.macros
.get(name)
- .map(|(_, macro_value)| self.expand_macros(&macro_value, target))
- .unwrap_or_else(String::new)
+ .map_or_else(String::new, |(_, macro_value)| {
+ self.expand_macros(macro_value, target)
+ })
};
let macro_value = match replacement {
Some((subst1, subst2)) => {