clippy_utils::hir_utils

Function both_some_and

Source
pub fn both_some_and<X, Y>(
    l: Option<X>,
    r: Option<Y>,
    pred: impl FnMut(X, Y) -> bool,
) -> bool
Expand description

Checks if the two Options are both Some and pass the predicate function.