libimagentryfilter: Update VersionInRange

Signed-off-by: Gavin Thomas Claugus <gclaugus@gmail.com>
This commit is contained in:
Gavin Thomas Claugus 2016-08-14 14:28:17 -04:00
parent 381cec0cca
commit 0b94490e81

View file

@ -5,17 +5,17 @@ use libimagstore::store::Entry;
use builtin::header::version::gt::VersionGt; use builtin::header::version::gt::VersionGt;
use builtin::header::version::lt::VersionLt; use builtin::header::version::lt::VersionLt;
use filters::filter::Filter; use filters::filter::Filter;
use ops::and::And; use filters::ops::and::And;
use ops::not::Not; use filters::ops::not::Not;
pub struct VersionInRange { pub struct VersionInRange {
and: And, and: And<VersionGt, VersionLt>,
} }
impl VersionInRange { impl VersionInRange {
pub fn new(lowerbound: Version, upperbound: Version) -> VersionInRange { pub fn new(lowerbound: Version, upperbound: Version) -> VersionInRange {
VersionInRange { and: VersionGt::new(lowerbound).and(Box::new(VersionLt::new(upperbound))) } VersionInRange { and: VersionGt::new(lowerbound).and(VersionLt::new(upperbound)) }
} }
} }
@ -29,7 +29,7 @@ impl Filter<Entry> for VersionInRange {
} }
pub struct VersionOutOfRange { pub struct VersionOutOfRange {
not: Not not: Not<VersionInRange>
} }
impl VersionOutOfRange { impl VersionOutOfRange {