diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2017-09-26 17:41:20 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2017-09-26 17:57:56 +0200 |
commit | 4be0e3b361615a84ecf1402b827a81ca62e95bc5 (patch) | |
tree | 900ca070850269155815499b88307566cecd0a50 /src/matcher.rs | |
parent | 77c3f75343dc84b87e99e333bc15ea5c308fc017 (diff) |
Implement filter interface for matchers
Diffstat (limited to 'src/matcher.rs')
-rw-r--r-- | src/matcher.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/matcher.rs b/src/matcher.rs index 1482b68..d574090 100644 --- a/src/matcher.rs +++ b/src/matcher.rs @@ -34,4 +34,15 @@ impl Matcher for Month { } +#[cfg(feature = "with-filters")] +use filters::filter::*; + +#[cfg(feature = "with-filters")] +impl<F> Matcher for F + where F: Filter<TimeType> +{ + fn matches(&self, tt: &TimeType) -> Result<bool> { + Ok(self.filter(tt)) + } +} |