1 2 3 4 5 6 7 8 9 10 11 12 13 14
use crate::prelude::Alternative; impl<'a, A> Alternative<'a, A> for Option<A> where A: 'a, { fn empty() -> Self { None } fn otherwise(self, other: Self) -> Self { self.or(other) } }