Esri / data-collection-ios

Mobile data collection app using the iOS Runtime SDK.
https://developers.arcgis.com/
Apache License 2.0
25 stars 26 forks source link

Use implementation of hash(into:) provided by the standard library #187

Closed philium closed 5 years ago

philium commented 5 years ago

Hashable.hashValue has been deprecated. The replacement is hash(into:), which could be implemented as follows:

public func hash(into hasher: inout Hasher) {
    hasher.combine(rawValue)
}

However, the standard library provides an implementation. From the documentation for RawRepresentable (to which UIControl.State conforms): "Available when Self conforms to Hashable and RawValue conforms to Hashable."