pub trait ContainsTruth {
fn contains_truth(&self) -> bool;
}
impl ContainsTruth for Option<bool> {
fn contains_truth(&self) -> bool {
matches!(self, Some(true))
}
}
impl<E> ContainsTruth for Result<bool, E> {
fn contains_truth(&self) -> bool {
matches!(self, Ok(true))
}
}