logo
pub fn equal<I, J>(a: I, b: J) -> bool where
    I: IntoIterator,
    J: IntoIterator,
    <I as IntoIterator>::Item: PartialEq<<J as IntoIterator>::Item>, 
Expand description

Return true if both iterables produce equal sequences (elements pairwise equal and sequences of the same length), false otherwise.

This is an IntoIterator enabled function that is similar to the standard library method Iterator::eq.

assert!(itertools::equal(vec![1, 2, 3], 1..4));
assert!(!itertools::equal(&[0, 0], &[0, 0, 0]));