stack_array/
comparisons.rs1use {
7 super::Array,
8 core::cmp::Ordering
9};
10
11
12const impl<
18 Type: [const] PartialEq<Type>,
19 To: [const] AsRef<[Type]>,
20 const N: usize
21> PartialEq<To> for Array<Type, N> {
22 fn eq(&self, other: &To) -> bool {return self.as_ref().eq(other.as_ref())}
23}
24
25const impl<Type: [const] Eq, const N: usize> Eq for Array<Type, N> {}
27
28
29const impl<
35 Type: [const] PartialOrd<Type>,
36 To: [const] AsRef<[Type]>,
37 const N: usize
38> PartialOrd<To> for Array<Type, N> {
39 fn partial_cmp(&self, other: &To) -> Option<Ordering> {
40 return self.as_ref().partial_cmp(other.as_ref());
41 }
42}
43
44const impl<Type: [const] Ord, const N: usize> Ord for Array<Type, N> {
46 fn cmp(&self, other: &Self) -> Ordering {return self.as_ref().cmp(other.as_ref())}
47}