Compare commits
2 Commits
bd361833b5
...
d152e2196d
Author | SHA1 | Date | |
---|---|---|---|
d152e2196d | |||
41972e28c5 |
@ -123,6 +123,15 @@ impl LocalFunctor for OptionClass {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl MonadFail<()> for OptionClass {
|
||||||
|
fn fail<'a, A: 'a>(_e: ()) -> Self::F<'a, A>
|
||||||
|
where
|
||||||
|
Self: 'a,
|
||||||
|
(): 'a {
|
||||||
|
None
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod option_tests {
|
mod option_tests {
|
||||||
use super::{test_suite, tests, Functor};
|
use super::{test_suite, tests, Functor};
|
||||||
|
@ -115,3 +115,13 @@ impl LocalFunctor for SoloClass {
|
|||||||
fa
|
fa
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl MonadFail<std::convert::Infallible> for SoloClass {
|
||||||
|
fn fail<'a, A: 'a>(e: std::convert::Infallible) -> Self::F<'a, A>
|
||||||
|
where
|
||||||
|
Self: 'a,
|
||||||
|
std::convert::Infallible: 'a,
|
||||||
|
{
|
||||||
|
match e {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user