[−][src]Function itertools::equal
pub fn equal<I, J>(a: I, b: J) -> bool where
I: IntoIterator,
J: IntoIterator,
I::Item: PartialEq<J::Item>,
Return true
if both iterators produce equal sequences
(elements pairwise equal and sequences of the same length),
false
otherwise.
Note: the standard library method Iterator::eq
now provides
the same functionality.
assert!(itertools::equal(vec![1, 2, 3], 1..4)); assert!(!itertools::equal(&[0, 0], &[0, 0, 0]));