Skip to content

Commit

Permalink
Add default Equatable and Hashable conformance to DataStructures
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbean committed Aug 28, 2019
1 parent e4271d0 commit 77e642e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions Sources/DataStructures/AVLTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,4 @@ extension AVLTree: ExpressibleByArrayLiteral {
}
}

extension AVLTree.Node: Hashable where Key: Hashable, Value: Hashable {
/// Uses the `ObjectIdentifier` of this `Node` to determine hashing.
public func hash(into hasher: inout Hasher) {
hasher.combine(ObjectIdentifier(self))
}
}

extension AVLTree: Equatable where Value: Equatable { }
extension AVLTree: Hashable where Key: Hashable, Value: Hashable { }

0 comments on commit 77e642e

Please sign in to comment.