Skip to content

Commit 23188af

Browse files
committed
[Foundation] CocoaError.Code, URLError.Code: Remove hashValue implementation
These implementations did not produce the same hash values as the raw value. RawRepresentable provides a correct hashing implementation by default, so let’s just use that.
1 parent 21d31ea commit 23188af

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

stdlib/public/Darwin/Foundation/NSError.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -570,10 +570,6 @@ public struct CocoaError : _BridgedStoredNSError {
570570
public init(rawValue: Int) {
571571
self.rawValue = rawValue
572572
}
573-
574-
public var hashValue: Int {
575-
return self.rawValue
576-
}
577573
}
578574
}
579575

@@ -1801,10 +1797,6 @@ public struct URLError : _BridgedStoredNSError {
18011797
public init(rawValue: Int) {
18021798
self.rawValue = rawValue
18031799
}
1804-
1805-
public var hashValue: Int {
1806-
return self.rawValue
1807-
}
18081800
}
18091801
}
18101802

0 commit comments

Comments
 (0)