diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/makefile/mod.rs | 5 | ||||
-rw-r--r-- | src/makefile/target.rs | 2 |
2 files changed, 4 insertions, 3 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(¯o_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)) => { diff --git a/src/makefile/target.rs b/src/makefile/target.rs index 443eee5..eb181cd 100644 --- a/src/makefile/target.rs +++ b/src/makefile/target.rs @@ -22,7 +22,7 @@ impl Target { .ok() } - pub(crate) fn newer_than(&self, other: &Target) -> Option<bool> { + pub(crate) fn newer_than(&self, other: &Self) -> Option<bool> { let self_updated = self.already_updated.get(); let other_updated = other.already_updated.get(); Some(match (self.modified_time(), other.modified_time()) { |