mirror of
https://github.com/apple/swift-collections
synced 2026-11-25 04:37:48 +00:00
[Capsule] Use provided hasher argument
This commit is contained in:
1 parent
b2808c45bb
commit
cf5310624b
1 file changed
+1
-1
@@ -14,7 +14,7 @@ extension HashMap: Hashable where Value: Hashable {
|
||||
public func hash(into hasher: inout Hasher) {
|
||||
var commutativeHash = 0
|
||||
for (key, value) in self {
|
||||
var elementHasher = Hasher()
|
||||
var elementHasher = hasher
|
||||
elementHasher.combine(key)
|
||||
elementHasher.combine(value)
|
||||
commutativeHash ^= elementHasher.finalize()
|
||||
|
||||
Reference in new issue
Block a user