Function assert_empty

Source
pub fn assert_empty<I: IntoIterator>(into_iter: I)
where I::Item: Debug,
Expand description

Asserts that an iterable object produces zero items.

assert_empty drains into_iter.into_iter() and asserts that zero items are produced. It panics with a message which includes the produced items if this assertion fails.