Function rando::assert_eq_up_to_order [] [src]

pub fn assert_eq_up_to_order<I1, I2, Item>(i1: I1, i2: I2) where
    I1: IntoIterator<Item = Item>,
    I2: IntoIterator<Item = Item>,
    Item: Ord + Debug

Asserts that the two given iterators (or values that can be converted into iterators) yield the same items, without regard to the order in which those items are yielded.

To try to be clearer, duplicate items are not counted as being "the same".

Panics

This function panics if the two iterators do not yield the same items, without regard to order.

Examples

assert_eq_up_to_order(&[1, 2, 3], &[3, 2, 1]);

assert_eq_up_to_order(&[4, 5, 6], &[4, 6, 5]);

assert_eq_up_to_order(&['a', 'b', 'c'], &['c', 'a', 'b']);