itertools icon indicating copy to clipboard operation
itertools copied to clipboard

Add assert_empty?

Open camsteffen opened this issue 5 years ago • 0 comments

I think this would be a useful addition.

pub fn assert_empty<I>(i: impl IntoIterator<Item = I>)
where
    I: Debug + PartialEq<I>,
{
    assert_equal(i, iter::empty::<I>());
}

Except it probably needs to have it's own error message implementation since "left" and "right" wouldn't make sense.

camsteffen avatar May 29 '20 14:05 camsteffen