From 31dc26284db364f55fd595c94123f5ba836ebaae Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Mon, 5 Apr 2021 15:43:01 -0600 Subject: "defined" is actually "nonempty" apparently --- src/makefile/macro.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/makefile/macro.rs b/src/makefile/macro.rs index f62d21d..43aff90 100644 --- a/src/makefile/macro.rs +++ b/src/makefile/macro.rs @@ -85,7 +85,7 @@ impl<'parent, 'lookup> Set<'parent, 'lookup> { #[cfg(feature = "full")] pub fn is_defined(&self, name: &str) -> bool { - self.data.contains_key(name) + self.data.get(name).map_or(false, |(_, x)| !x.is_empty()) } // `remove` is fine, but I think for "remove-and-return" `pop` is better -- cgit v1.2.3