aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/mod.rs
diff options
context:
space:
mode:
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)) => {