Skip to content

Commit 21d31ea

Browse files
committed
[Foundation] _Bridged[Stored]NSError: Remove explicit impls for hashValue/_rawHashValue
The compiler-synthesized / stdlib-provided default implementations seem perfectly fine for these.
1 parent bbaec3d commit 21d31ea

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

stdlib/public/Darwin/Foundation/NSError.swift

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -409,12 +409,6 @@ extension _BridgedNSError where Self.RawValue: FixedWidthInteger {
409409
public func hash(into hasher: inout Hasher) {
410410
hasher.combine(_code)
411411
}
412-
413-
public var hashValue: Int { return _code }
414-
415-
public func _rawHashValue(seed: Int) -> Int {
416-
return _code._rawHashValue(seed: seed)
417-
}
418412
}
419413

420414
/// Describes a bridged error that stores the underlying NSError, so
@@ -492,14 +486,6 @@ extension _BridgedStoredNSError {
492486
public func hash(into hasher: inout Hasher) {
493487
hasher.combine(_nsError)
494488
}
495-
496-
public var hashValue: Int {
497-
return _nsError.hash
498-
}
499-
500-
public func _rawHashValue(seed: Int) -> Int {
501-
return _nsError._rawHashValue(seed: seed)
502-
}
503489
}
504490

505491
/// Describes the code of an error.

0 commit comments

Comments
 (0)