aboutsummaryrefslogtreecommitdiff
path: root/src/makefile/token.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-04-14 14:28:59 -0600
committerMelody Horn <melody@boringcactus.com>2021-04-14 14:28:59 -0600
commita17224fa6300452800c7162e9eb8948025a5dbb1 (patch)
treeb4362e63d7b21c4e1952ab1917023983a568b5c9 /src/makefile/token.rs
parent280cab03189a22f2dec1dc2f97f985d092bbb24d (diff)
downloadmakers-a17224fa6300452800c7162e9eb8948025a5dbb1.tar.gz
makers-a17224fa6300452800c7162e9eb8948025a5dbb1.zip
always recurse when in dry-run etc mode
Diffstat (limited to 'src/makefile/token.rs')
-rw-r--r--src/makefile/token.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/makefile/token.rs b/src/makefile/token.rs
index 294e80d..2f90f50 100644
--- a/src/makefile/token.rs
+++ b/src/makefile/token.rs
@@ -155,6 +155,15 @@ impl fmt::Display for TokenString {
}
}
+impl PartialEq<str> for TokenString {
+ fn eq(&self, other: &str) -> bool {
+ match self.0.as_slice() {
+ [Token::Text(x)] => x == other,
+ _ => false,
+ }
+ }
+}
+
#[derive(PartialEq, Eq, Clone, Debug)]
pub enum Token {
Text(String),