Skip to content

Commit 420f01a

Browse files
committed
Remove custom ResolvedTarget.Dependency conformance
1 parent 456959e commit 420f01a

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

Sources/PackageGraph/Resolution/ResolvedTarget.swift

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import func TSCBasic.topologicalSort
1717
/// Represents a fully resolved target. All the dependencies for the target are resolved.
1818
public final class ResolvedTarget {
1919
/// Represents dependency of a resolved target.
20-
public enum Dependency {
20+
public enum Dependency: Hashable {
2121
/// Direct dependency of the target. This target is in the same package and should be statically linked.
2222
case target(_ target: ResolvedTarget, conditions: Set<PackageCondition>)
2323

@@ -171,30 +171,6 @@ extension ResolvedTarget: CustomStringConvertible {
171171
}
172172
}
173173

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-
198174
extension ResolvedTarget.Dependency: CustomStringConvertible {
199175
public var description: String {
200176
var str = "<ResolvedTarget.Dependency: "

0 commit comments

Comments
 (0)