[Capsule] Implement Equatable protocol

This commit is contained in:
Michael Steindorfer committed 2022-08-09 17:20:28 +02:00
1 parent 8e2ec3c49b
commit b34c8dad97
3 files changed
+72 -23

No files matched your search

+2 -2
View File
@@ -87,8 +87,8 @@ final class HashCollisionMapNode<Key, Value> : MapNode where Key : Hashable {
func getPayload(_ index: Int) -> (Key, Value) { content[index] }
}
extension HashCollisionMapNode /* : Equatable where Value : Equatable */ {
extension HashCollisionMapNode : Equatable where Value : Equatable {
static func == (lhs: HashCollisionMapNode<Key, Value>, rhs: HashCollisionMapNode<Key, Value>) -> Bool {
preconditionFailure("Not yet implemented")
Dictionary.init(uniqueKeysWithValues: lhs.content) == Dictionary.init(uniqueKeysWithValues: rhs.content)
}
}