1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
use list::List; use map::{Map, BloomMap}; use set::{Set, BloomSet}; impl<'a, 'b, A, B> PartialEq<List<'b, B>> for List<'a, A> where A: PartialEq<B>, { #[inline] fn eq(&self, other: &List<'b, B>) -> bool { self.iter().eq(other.iter()) } } impl<'a, 'b, KA, VA, KB, VB> PartialEq<Map<'b, KB, VB>> for Map<'a, KA, VA> where (&'a KA, VA): PartialEq<(&'b KB, VB)>, VA: Copy, VB: Copy, { #[inline] fn eq(&self, other: &Map<'b, KB, VB>) -> bool { self.iter().eq(other.iter()) } } impl<'a, 'b, KA, VA, KB, VB> PartialEq<BloomMap<'b, KB, VB>> for BloomMap<'a, KA, VA> where (&'a KA, VA): PartialEq<(&'b KB, VB)>, VA: Copy, VB: Copy, { #[inline] fn eq(&self, other: &BloomMap<'b, KB, VB>) -> bool { self.iter().eq(other.iter()) } } impl<'a, 'b, A, B> PartialEq<Set<'b, B>> for Set<'a, A> where A: PartialEq<B>, { #[inline] fn eq(&self, other: &Set<'b, B>) -> bool { self.iter().eq(other.iter()) } } impl<'a, 'b, A, B> PartialEq<BloomSet<'b, B>> for BloomSet<'a, A> where A: PartialEq<B>, { #[inline] fn eq(&self, other: &BloomSet<'b, B>) -> bool { self.iter().eq(other.iter()) } }