Remove collection conformances to Equatable and Hashable (#124)

This commit is contained in:
Tim Vermeulen authored and GitHub committed 2021-04-09 14:44:16 -05:00
1 parent bcdbac800a
commit abc5559ef6
14 files changed
+2 -209

No files matched your search

-15
View File
@@ -512,21 +512,6 @@ extension Collection {
}
}
// Conditional conformances.
extension ChunkedByCount: Equatable where Base: Equatable {}
// Since we have another stored property of type `Index` on the
// collection, synthesis of `Hashble` conformace would require
// a `Base.Index: Hashable` constraint, so we implement the hasher
// only in terms of `base` and `chunkCount`. Since the computed
// index is based on it, it should not make a difference here.
extension ChunkedByCount: Hashable where Base: Hashable {
@inlinable
public func hash(into hasher: inout Hasher) {
hasher.combine(base)
hasher.combine(chunkCount)
}
}
extension ChunkedByCount.Index: Hashable where Base.Index: Hashable {}
// Lazy conditional conformance.