Merge pull request #605 from matthiasbeyer/libimagentryfilter/bool-filter

Add BoolFilter
This commit is contained in:
Matthias Beyer 2016-07-31 22:02:43 +02:00 committed by GitHub
commit 6e988782da
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,22 @@
use libimagstore::store::Entry;
use filter::Filter;
pub struct BoolFilter(bool);
impl BoolFilter {
pub fn new(b: bool) -> BoolFilter {
BoolFilter(b)
}
}
impl Filter for BoolFilter {
fn filter(&self, _: &Entry) -> bool {
self.0
}
}

View file

@ -1,2 +1,5 @@
pub mod content; pub mod content;
pub mod header; pub mod header;
pub mod bool_filter;