@@ -2,36 +2,36 @@ use crate::cmp::BytewiseEq;
2
2
use crate :: convert:: TryInto ;
3
3
4
4
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
5
- impl < A , B , const N : usize > PartialEq < [ B ; N ] > for [ A ; N ]
5
+ impl < T , U , const N : usize > PartialEq < [ U ; N ] > for [ T ; N ]
6
6
where
7
- A : PartialEq < B > ,
7
+ T : PartialEq < U > ,
8
8
{
9
9
#[ inline]
10
- fn eq ( & self , other : & [ B ; N ] ) -> bool {
10
+ fn eq ( & self , other : & [ U ; N ] ) -> bool {
11
11
SpecArrayEq :: spec_eq ( self , other)
12
12
}
13
13
#[ inline]
14
- fn ne ( & self , other : & [ B ; N ] ) -> bool {
14
+ fn ne ( & self , other : & [ U ; N ] ) -> bool {
15
15
SpecArrayEq :: spec_ne ( self , other)
16
16
}
17
17
}
18
18
19
19
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
20
- impl < A , B , const N : usize > PartialEq < [ B ] > for [ A ; N ]
20
+ impl < T , U , const N : usize > PartialEq < [ U ] > for [ T ; N ]
21
21
where
22
- A : PartialEq < B > ,
22
+ T : PartialEq < U > ,
23
23
{
24
24
#[ inline]
25
- fn eq ( & self , other : & [ B ] ) -> bool {
26
- let b: Result < & [ B ; N ] , _ > = other. try_into ( ) ;
25
+ fn eq ( & self , other : & [ U ] ) -> bool {
26
+ let b: Result < & [ U ; N ] , _ > = other. try_into ( ) ;
27
27
match b {
28
28
Ok ( b) => * self == * b,
29
29
Err ( _) => false ,
30
30
}
31
31
}
32
32
#[ inline]
33
- fn ne ( & self , other : & [ B ] ) -> bool {
34
- let b: Result < & [ B ; N ] , _ > = other. try_into ( ) ;
33
+ fn ne ( & self , other : & [ U ] ) -> bool {
34
+ let b: Result < & [ U ; N ] , _ > = other. try_into ( ) ;
35
35
match b {
36
36
Ok ( b) => * self != * b,
37
37
Err ( _) => true ,
@@ -40,21 +40,21 @@ where
40
40
}
41
41
42
42
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
43
- impl < A , B , const N : usize > PartialEq < [ A ; N ] > for [ B ]
43
+ impl < T , U , const N : usize > PartialEq < [ U ; N ] > for [ T ]
44
44
where
45
- B : PartialEq < A > ,
45
+ T : PartialEq < U > ,
46
46
{
47
47
#[ inline]
48
- fn eq ( & self , other : & [ A ; N ] ) -> bool {
49
- let b: Result < & [ B ; N ] , _ > = self . try_into ( ) ;
48
+ fn eq ( & self , other : & [ U ; N ] ) -> bool {
49
+ let b: Result < & [ T ; N ] , _ > = self . try_into ( ) ;
50
50
match b {
51
51
Ok ( b) => * b == * other,
52
52
Err ( _) => false ,
53
53
}
54
54
}
55
55
#[ inline]
56
- fn ne ( & self , other : & [ A ; N ] ) -> bool {
57
- let b: Result < & [ B ; N ] , _ > = self . try_into ( ) ;
56
+ fn ne ( & self , other : & [ U ; N ] ) -> bool {
57
+ let b: Result < & [ T ; N ] , _ > = self . try_into ( ) ;
58
58
match b {
59
59
Ok ( b) => * b != * other,
60
60
Err ( _) => true ,
@@ -63,61 +63,61 @@ where
63
63
}
64
64
65
65
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
66
- impl < A , B , const N : usize > PartialEq < & [ B ] > for [ A ; N ]
66
+ impl < T , U , const N : usize > PartialEq < & [ U ] > for [ T ; N ]
67
67
where
68
- A : PartialEq < B > ,
68
+ T : PartialEq < U > ,
69
69
{
70
70
#[ inline]
71
- fn eq ( & self , other : & & [ B ] ) -> bool {
71
+ fn eq ( & self , other : & & [ U ] ) -> bool {
72
72
* self == * * other
73
73
}
74
74
#[ inline]
75
- fn ne ( & self , other : & & [ B ] ) -> bool {
75
+ fn ne ( & self , other : & & [ U ] ) -> bool {
76
76
* self != * * other
77
77
}
78
78
}
79
79
80
80
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
81
- impl < A , B , const N : usize > PartialEq < [ A ; N ] > for & [ B ]
81
+ impl < T , U , const N : usize > PartialEq < [ U ; N ] > for & [ T ]
82
82
where
83
- B : PartialEq < A > ,
83
+ T : PartialEq < U > ,
84
84
{
85
85
#[ inline]
86
- fn eq ( & self , other : & [ A ; N ] ) -> bool {
86
+ fn eq ( & self , other : & [ U ; N ] ) -> bool {
87
87
* * self == * other
88
88
}
89
89
#[ inline]
90
- fn ne ( & self , other : & [ A ; N ] ) -> bool {
90
+ fn ne ( & self , other : & [ U ; N ] ) -> bool {
91
91
* * self != * other
92
92
}
93
93
}
94
94
95
95
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
96
- impl < A , B , const N : usize > PartialEq < & mut [ B ] > for [ A ; N ]
96
+ impl < T , U , const N : usize > PartialEq < & mut [ U ] > for [ T ; N ]
97
97
where
98
- A : PartialEq < B > ,
98
+ T : PartialEq < U > ,
99
99
{
100
100
#[ inline]
101
- fn eq ( & self , other : & & mut [ B ] ) -> bool {
101
+ fn eq ( & self , other : & & mut [ U ] ) -> bool {
102
102
* self == * * other
103
103
}
104
104
#[ inline]
105
- fn ne ( & self , other : & & mut [ B ] ) -> bool {
105
+ fn ne ( & self , other : & & mut [ U ] ) -> bool {
106
106
* self != * * other
107
107
}
108
108
}
109
109
110
110
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
111
- impl < A , B , const N : usize > PartialEq < [ A ; N ] > for & mut [ B ]
111
+ impl < T , U , const N : usize > PartialEq < [ U ; N ] > for & mut [ T ]
112
112
where
113
- B : PartialEq < A > ,
113
+ T : PartialEq < U > ,
114
114
{
115
115
#[ inline]
116
- fn eq ( & self , other : & [ A ; N ] ) -> bool {
116
+ fn eq ( & self , other : & [ U ; N ] ) -> bool {
117
117
* * self == * other
118
118
}
119
119
#[ inline]
120
- fn ne ( & self , other : & [ A ; N ] ) -> bool {
120
+ fn ne ( & self , other : & [ U ; N ] ) -> bool {
121
121
* * self != * other
122
122
}
123
123
}
0 commit comments