diff options
author | Melody Horn <melody@boringcactus.com> | 2021-04-05 15:43:01 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-04-05 15:43:01 -0600 |
commit | 31dc26284db364f55fd595c94123f5ba836ebaae (patch) | |
tree | e59aa8725097d2357d4b8b82639ceed685e69c36 | |
parent | 943f6886ca150a5852fb336791cab9f045c47433 (diff) | |
download | makers-31dc26284db364f55fd595c94123f5ba836ebaae.tar.gz makers-31dc26284db364f55fd595c94123f5ba836ebaae.zip |
"defined" is actually "nonempty" apparently
-rw-r--r-- | src/makefile/macro.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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 |