@@ -109,23 +109,6 @@ public enum VersionSetSpecifier: Hashable, CustomStringConvertible {
109109 }
110110 }
111111
112- //FIXME: Remove in 4.2
113- public var hashValue : Int {
114- switch ( self ) {
115- case . any:
116- return 0xB58D
117-
118- case . empty:
119- return 0x7121
120-
121- case . range( let range) :
122- return 0x4CF3 ^ ( range. lowerBound. hashValue &* 31 ) ^ range. upperBound. hashValue
123-
124- case . exact( let version) :
125- return 0xD04F ^ version. hashValue
126- }
127- }
128-
129112 /// Check if the set contains a version.
130113 public func contains( _ version: Version ) -> Bool {
131114 switch self {
@@ -417,15 +400,6 @@ public struct PackageContainerConstraintSet<C: PackageContainer>: Collection, Ha
417400 return constraints [ identifier] ?? . versionSet( . any)
418401 }
419402
420- //FIXME: Remove in 4.2? Perhaps?
421- public var hashValue : Int {
422- var result = 0
423- for c in self . constraints {
424- result ^= c. key. hashValue &* 0x62F ^ c. value. hashValue
425- }
426- return result
427- }
428-
429403 /// Create a constraint set by merging the `requirement` for container `identifier`.
430404 ///
431405 /// - Returns: The new set, or nil the resulting set is unsatisfiable.
@@ -839,8 +813,9 @@ public class DependencyResolver<
839813 let container : Container
840814 let allConstraints : ConstraintSet
841815
842- var hashValue : Int {
843- return container. identifier. hashValue ^ allConstraints. hashValue
816+ func hash( into hasher: inout Hasher ) {
817+ hasher. combine ( container. identifier)
818+ hasher. combine ( allConstraints)
844819 }
845820
846821 static func == ( lhs: ResolveSubtreeCacheKey , rhs: ResolveSubtreeCacheKey ) -> Bool {
0 commit comments