Skip to content

Commit ee95d59

Browse files
authored
Use hash(into:) instead of hashValue for UnorderedPair Hashable conformance (#187)
1 parent 1352713 commit ee95d59

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/DataStructures/Pair/UnorderedPair.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ extension UnorderedPair: Hashable where T: Hashable {
5454

5555
/// Implements hashable requirement.
5656
@inlinable
57-
public var hashValue: Int {
58-
return a.hashValue ^ b.hashValue
57+
public func hash(into hasher: inout Hasher) {
58+
hasher.combine(a.hashValue ^ b.hashValue)
5959
}
6060
}

0 commit comments

Comments
 (0)