Skip to main content

assert_any

Function assert_any 

Source
pub fn assert_any<I: IntoIterator>(iter: I, pred: impl FnMut(I::Item) -> bool)
where I::Item: Debug,
Expand description

Assert that pred returns true for at least one item in iter.

This provides a panic message showing the values, to aid debugging.