pub fn some_elements_satisfy<'a, T, I, P>(
predicate: P,
) -> Box<dyn Fn(&'a I) -> MatchResult>
Expand description
Matches if at least one element in the asserted collection satisfy the given predicate
.
An empty collection never satisfies this matcher as no element satisfies the predicate.
#Examples
use galvanic_assert::matchers::collection::*;
assert_that!(&vec![1,2,3,4,5], some_elements_satisfy(|&a| 2 <= a && a < 5));