diff options
Diffstat (limited to 'src/failable/ops/xor.rs')
-rw-r--r-- | src/failable/ops/xor.rs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/failable/ops/xor.rs b/src/failable/ops/xor.rs index ecc38ce..9ccfd8e 100644 --- a/src/failable/ops/xor.rs +++ b/src/failable/ops/xor.rs @@ -24,11 +24,13 @@ impl<T, U> FailableXOr<T, U> { } -impl<N, E, T, U> FailableFilter<N, E> for FailableXOr<T, U> - where T: FailableFilter<N, E>, - U: FailableFilter<N, E> +impl<N, T, U, E> FailableFilter<N> for FailableXOr<T, U> + where T: FailableFilter<N, Error = E>, + U: FailableFilter<N, Error = E> { - fn filter(&self, e: &N) -> Result<bool, E> { + type Error = E; + + fn filter(&self, e: &N) -> Result<bool, Self::Error> { Ok(try!(self.0.filter(e)) ^ try!(self.1.filter(e))) } } |