Function equal
pub fn equal<I, J>(a: I, b: J) -> boolwhere
I: IntoIterator,
J: IntoIterator,
<I as IntoIterator>::Item: PartialEq<<J as IntoIterator>::Item>,
Available on crate feature
dep_itertools
only.Expand description
Return true
if both iterables produce equal sequences
(elements pairwise equal and sequences of the same length),
false
otherwise.
IntoIterator
enabled version of Iterator::eq
.
assert!(itertools::equal(vec![1, 2, 3], 1..4));
assert!(!itertools::equal(&[0, 0], &[0, 0, 0]));