mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[Foundation] String.Encoding: Modernize hashing
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user