Function itertools::assert_equal [] [src]

pub fn assert_equal<I, J>(a: I, b: J) where
    I: IntoIterator,
    J: IntoIterator,
    I::Item: Debug + PartialEq<J::Item>,
    J::Item: Debug

Assert that two iterators produce equal sequences, with the same semantics as equal(a, b).

Panics on assertion failure with a message that shows the two iteration elements.

Be careful when using this code, it's not being tested!
assert_equal("exceed".split('c'), "excess".split('c'));
// ^PANIC: panicked at 'Failed assertion Some("eed") == Some("ess") for iteration 1',