@@ -17,7 +17,7 @@ import func TSCBasic.topologicalSort
17
17
/// Represents a fully resolved target. All the dependencies for the target are resolved.
18
18
public final class ResolvedTarget {
19
19
/// Represents dependency of a resolved target.
20
- public enum Dependency {
20
+ public enum Dependency : Hashable {
21
21
/// Direct dependency of the target. This target is in the same package and should be statically linked.
22
22
case target( _ target: ResolvedTarget , conditions: Set < PackageCondition > )
23
23
@@ -171,30 +171,6 @@ extension ResolvedTarget: CustomStringConvertible {
171
171
}
172
172
}
173
173
174
- extension ResolvedTarget . Dependency : Equatable {
175
- public static func == ( lhs: ResolvedTarget . Dependency , rhs: ResolvedTarget . Dependency ) -> Bool {
176
- switch ( lhs, rhs) {
177
- case ( . target( let lhsTarget, _) , . target( let rhsTarget, _) ) :
178
- return lhsTarget == rhsTarget
179
- case ( . product( let lhsProduct, _) , . product( let rhsProduct, _) ) :
180
- return lhsProduct == rhsProduct
181
- case ( . product, . target) , ( . target, . product) :
182
- return false
183
- }
184
- }
185
- }
186
-
187
- extension ResolvedTarget . Dependency : Hashable {
188
- public func hash( into hasher: inout Hasher ) {
189
- switch self {
190
- case . target( let target, _) :
191
- hasher. combine ( target)
192
- case . product( let product, _) :
193
- hasher. combine ( product)
194
- }
195
- }
196
- }
197
-
198
174
extension ResolvedTarget . Dependency : CustomStringConvertible {
199
175
public var description : String {
200
176
var str = " <ResolvedTarget.Dependency: "
0 commit comments