diff options
Diffstat (limited to 'src/ops/or.rs')
-rw-r--r-- | src/ops/or.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ops/or.rs b/src/ops/or.rs index d0de785..a89d8cc 100644 --- a/src/ops/or.rs +++ b/src/ops/or.rs @@ -13,17 +13,14 @@ use filter::Filter; #[must_use = "filters are lazy and do nothing unless consumed"] #[derive(Clone)] -pub struct Or<T, U> { - a: T, - b: U -} +pub struct Or<T, U>(T, U); impl<T, U> Or<T, U> { pub fn new(a: T, b: U) -> Or<T, U> { - Or { a: a, b: b } + Or(a, b) } } -impl_operators!(Or, self e { self.a.filter(e) || self.b.filter(e) }, T, U); +impl_operators!(Or, self e { self.0.filter(e) || self.1.filter(e) }, T, U); |