Skip to content

Commit 9a6f5c4

Browse files
committed
Synthesize Equatable where possible
1 parent 8185639 commit 9a6f5c4

File tree

3 files changed

+0
-34
lines changed

3 files changed

+0
-34
lines changed

Sources/PackageGraph/DependencyResolver.swift

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -144,27 +144,6 @@ public enum VersionSetSpecifier: Hashable, CustomStringConvertible {
144144
return version.description
145145
}
146146
}
147-
148-
public static func == (_ lhs: VersionSetSpecifier, _ rhs: VersionSetSpecifier) -> Bool {
149-
switch (lhs, rhs) {
150-
case (.any, .any):
151-
return true
152-
case (.any, _):
153-
return false
154-
case (.empty, .empty):
155-
return true
156-
case (.empty, _):
157-
return false
158-
case (.range(let lhs), .range(let rhs)):
159-
return lhs == rhs
160-
case (.range, _):
161-
return false
162-
case (.exact(let lhs), .exact(let rhs)):
163-
return lhs == rhs
164-
case (.exact, _):
165-
return false
166-
}
167-
}
168147
}
169148

170149
/// An identifier which unambiguously references a package container.
@@ -327,10 +306,6 @@ public struct PackageContainerConstraint<T: PackageContainerIdentifier>: CustomS
327306
public var description: String {
328307
return "Constraint(\(identifier), \(requirement))"
329308
}
330-
331-
public static func == (lhs: PackageContainerConstraint, rhs: PackageContainerConstraint) -> Bool {
332-
return lhs.identifier == rhs.identifier && lhs.requirement == rhs.requirement
333-
}
334309
}
335310

336311
/// Delegate interface for dependency resoler status.

Sources/PackageModel/ToolsVersion.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ public struct ToolsVersion: CustomStringConvertible, Comparable {
9090

9191
// MARK: - Comparable
9292

93-
public static func == (lhs: ToolsVersion, rhs: ToolsVersion) -> Bool {
94-
return lhs._version == rhs._version
95-
}
96-
9793
public static func < (lhs: ToolsVersion, rhs: ToolsVersion) -> Bool {
9894
return lhs._version < rhs._version
9995
}

Sources/Workspace/PinsStore.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,4 @@ extension PinsStore.Pin: JSONMappable, JSONSerializable, Equatable {
188188
"state": state,
189189
])
190190
}
191-
192-
public static func == (lhs: PinsStore.Pin, rhs: PinsStore.Pin) -> Bool {
193-
return lhs.packageRef == rhs.packageRef &&
194-
lhs.state == rhs.state
195-
}
196191
}

0 commit comments

Comments
 (0)