File tree 7 files changed +11
-14
lines changed
7 files changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -157,7 +157,7 @@ class Box<T : Hashable> : Hashable {
157
157
return value. hashValue
158
158
}
159
159
160
- static func == < T : Equatable > ( lhs: Box < T > , rhs: Box < T > ) -> Bool {
160
+ static func == ( lhs: Box , rhs: Box ) -> Bool {
161
161
return lhs. value == rhs. value
162
162
}
163
163
}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ public func run_Dictionary2(_ N: Int) {
37
37
CheckResults ( res == ref_result, " Incorrect results in Dictionary2: \( res) != \( ref_result) " )
38
38
}
39
39
40
- class Box < T : Hashable > : Hashable where T : Equatable {
40
+ class Box < T : Hashable > : Hashable {
41
41
var value : T
42
42
43
43
init ( _ v: T ) {
@@ -48,7 +48,7 @@ class Box<T : Hashable> : Hashable where T : Equatable {
48
48
return value. hashValue
49
49
}
50
50
51
- static func == < T : Equatable > ( lhs: Box < T > , rhs: Box < T > ) -> Bool {
51
+ static func == ( lhs: Box , rhs: Box ) -> Bool {
52
52
return lhs. value == rhs. value
53
53
}
54
54
}
Original file line number Diff line number Diff line change @@ -54,13 +54,10 @@ class Box<T : Hashable> : Hashable {
54
54
var hashValue : Int {
55
55
return value. hashValue
56
56
}
57
- }
58
-
59
- extension Box : Equatable {
60
- }
61
-
62
- func == < T: Equatable > ( lhs: Box < T > , rhs: Box < T > ) -> Bool {
63
- return lhs. value == rhs. value
57
+
58
+ static func == ( lhs: Box , rhs: Box ) -> Bool {
59
+ return lhs. value == rhs. value
60
+ }
64
61
}
65
62
66
63
@inline ( never)
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ class Box<T : Hashable> : Hashable {
53
53
return value. hashValue
54
54
}
55
55
56
- static func == < T : Equatable > ( lhs: Box < T > , rhs: Box < T > ) -> Bool {
56
+ static func == ( lhs: Box , rhs: Box ) -> Bool {
57
57
return lhs. value == rhs. value
58
58
}
59
59
}
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ class Box<T : Hashable> : Hashable {
56
56
return value. hashValue
57
57
}
58
58
59
- static func == < T : Equatable > ( lhs: Box < T > , rhs: Box < T > ) -> Bool {
59
+ static func == ( lhs: Box , rhs: Box ) -> Bool {
60
60
return lhs. value == rhs. value
61
61
}
62
62
}
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ class Box<T : Hashable> : Hashable {
124
124
return value. hashValue
125
125
}
126
126
127
- static func == < T : Equatable > ( lhs: Box < T > , rhs: Box < T > ) -> Bool {
127
+ static func == ( lhs: Box , rhs: Box ) -> Bool {
128
128
return lhs. value == rhs. value
129
129
}
130
130
}
Original file line number Diff line number Diff line change @@ -115,7 +115,7 @@ class Box<T : Hashable> : Hashable {
115
115
return value. hashValue
116
116
}
117
117
118
- static func == < T : Equatable > ( lhs: Box < T > , rhs: Box < T > ) -> Bool {
118
+ static func == ( lhs: Box , rhs: Box ) -> Bool {
119
119
return lhs. value == rhs. value
120
120
}
121
121
}
You can’t perform that action at this time.
0 commit comments