orx_linked_list/list/common_traits/
eq.rs1use crate::{Doubly, DoublyIterable, List, Singly, SinglyIterable};
2use orx_pinned_vec::PinnedVec;
3use orx_selfref_col::{MemoryPolicy, Node};
4
5impl<T, M, P> PartialEq for List<Singly<T>, M, P>
8where
9 T: PartialEq,
10 M: MemoryPolicy<Singly<T>>,
11 P: PinnedVec<Node<Singly<T>>>,
12{
13 fn eq(&self, other: &Self) -> bool {
14 self.eq_to_iter_refs(other.iter())
15 }
16}
17
18impl<T, M, P> Eq for List<Singly<T>, M, P>
19where
20 T: PartialEq,
21 M: MemoryPolicy<Singly<T>>,
22 P: PinnedVec<Node<Singly<T>>>,
23{
24}
25
26impl<T, M, P> PartialEq for List<Doubly<T>, M, P>
29where
30 T: PartialEq,
31 M: MemoryPolicy<Doubly<T>>,
32 P: PinnedVec<Node<Doubly<T>>>,
33{
34 fn eq(&self, other: &Self) -> bool {
35 self.eq_to_iter_refs(other.iter())
36 }
37}
38
39impl<T, M, P> Eq for List<Doubly<T>, M, P>
40where
41 T: PartialEq,
42 M: MemoryPolicy<Doubly<T>>,
43 P: PinnedVec<Node<Doubly<T>>>,
44{
45}