Open
Description
The Hashable
documentation should be more clear about the exact relationship of the Hashable
and Equatable
protocols. Specifically, the docs should make the expectation that all properties that are included in the ==
implementation are also included in hash(into:)
and vice versa. It would be great if the docs could also discuss what happens if something like a struct property is left out of the Hashable
/Equatable
conformance implementations.
For the Set
type, the docs should describe the requirement for the elements. That is, Hashable
conformance is required and a type's Equatable
is used to determine uniqueness within the set.
Links: