[Foundation] String.Encoding: Modernize hashing

This commit is contained in:
Karoy Lorentey
2019-04-04 14:20:09 -07:00
parent 81567ed85e
commit 0867f7e17f
2 changed files with 13 additions and 2 deletions

View File

@@ -51,8 +51,8 @@ extension String {
}
extension String.Encoding : Hashable {
public var hashValue : Int {
return rawValue.hashValue
public func hash(into hasher: inout Hasher) {
hasher.combine(rawValue)
}
public static func ==(lhs: String.Encoding, rhs: String.Encoding) -> Bool {