summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-04-20 13:27:31 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-04-20 13:27:31 +0200
commit45b1459d593db932f0321c7b96df253cbb4ee1e1 (patch)
tree215f292c1c32e8cd62aae88cac87b68631c31929
parent6fb65a96b1ab3adb4d847ae6d468a8629b005690 (diff)
Remove Filter::as_failable()remove-as-failable
We cannot make an object out of a `Filter<T>` because of this function, so we remove this function which is unused anyways. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
-rw-r--r--src/filter.rs19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/filter.rs b/src/filter.rs
index 5c33160..d4f2efd 100644
--- a/src/filter.rs
+++ b/src/filter.rs
@@ -302,25 +302,6 @@ pub trait Filter<N> {
{
IntoFailable::new(self)
}
-
- /// Helper to borrow a filter as a FailbleFilter
- ///
- /// ```
- /// use filters::filter::Filter;
- /// use filters::failable::filter::FailableFilter;
- ///
- /// let a = (|&a: &usize| { a > 5 });
- /// let b = a.as_failable();
- ///
- /// assert_eq!(a.filter(&3), false);
- /// 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>
- where Self: 'a
- {
- AsFailable::new(self)
- }
}
#[macro_export]