File tree Expand file tree Collapse file tree 1 file changed +6
-12
lines changed
stdlib/public/Darwin/Foundation Expand file tree Collapse file tree 1 file changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -406,7 +406,9 @@ extension _BridgedNSError where Self.RawValue: FixedWidthInteger {
406
406
self . init ( rawValue: RawValue ( _bridgedNSError. code) )
407
407
}
408
408
409
- public var hashValue : Int { return _code }
409
+ public func hash( into hasher: inout Hasher ) {
410
+ hasher. combine ( _code)
411
+ }
410
412
}
411
413
412
414
/// Describes a bridged error that stores the underlying NSError, so
@@ -480,9 +482,9 @@ public extension _BridgedStoredNSError {
480
482
}
481
483
482
484
/// Implementation of Hashable for all _BridgedStoredNSErrors.
483
- public extension _BridgedStoredNSError {
484
- var hashValue : Int {
485
- return _nsError . hashValue
485
+ extension _BridgedStoredNSError {
486
+ public func hash ( into hasher : inout Hasher ) {
487
+ hasher . combine ( _nsError )
486
488
}
487
489
}
488
490
@@ -568,10 +570,6 @@ public struct CocoaError : _BridgedStoredNSError {
568
570
public init ( rawValue: Int ) {
569
571
self . rawValue = rawValue
570
572
}
571
-
572
- public var hashValue : Int {
573
- return self . rawValue
574
- }
575
573
}
576
574
}
577
575
@@ -1799,10 +1797,6 @@ public struct URLError : _BridgedStoredNSError {
1799
1797
public init ( rawValue: Int ) {
1800
1798
self . rawValue = rawValue
1801
1799
}
1802
-
1803
- public var hashValue : Int {
1804
- return self . rawValue
1805
- }
1806
1800
}
1807
1801
}
1808
1802
You can’t perform that action at this time.
0 commit comments