diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2018-04-29 10:42:30 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2018-04-29 10:48:28 +0200 |
commit | 68df53a1467f0dd9c37114cdb7980783fb1fa3a0 (patch) | |
tree | 32213b67883891866a51c38f17e4ff46e26e2d9a /src/filter.rs | |
parent | b531c50e550d05c95ea02370ba02c0535a4ef5f5 (diff) |
Make error type associated
The problem with the FailingFilter was, that the error type was not an
associated type but a generic type parameter.
This patch fixes this.
Diffstat (limited to 'src/filter.rs')
-rw-r--r-- | src/filter.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/filter.rs b/src/filter.rs index 33d1511..5c33160 100644 --- a/src/filter.rs +++ b/src/filter.rs @@ -297,7 +297,7 @@ pub trait Filter<N> { /// assert_eq!(a.filter(&7), Ok(true)); /// assert_eq!(a.filter(&9), Ok(true)); /// ``` - fn into_failable(self) -> IntoFailable<Self, ()> + fn into_failable(self) -> IntoFailable<Self> where Self: Sized { IntoFailable::new(self) @@ -316,7 +316,7 @@ pub trait Filter<N> { /// assert_eq!(b.filter(&3), Ok(false)); /// assert_eq!(a.filter(&7), true); /// assert_eq!(b.filter(&7), Ok(true)); - fn as_failable<'a>(&'a self) -> AsFailable<'a, Self, ()> + fn as_failable<'a>(&'a self) -> AsFailable<'a, Self> where Self: 'a { AsFailable::new(self) |