Skip to content

[stdlib][docs] Slightly clarify Hashable docs #58652

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 4, 2022

Conversation

lorentey
Copy link
Member

@lorentey lorentey commented May 3, 2022

In hash(into:) docs, clarify that the prohibition on calling finalize() only applies to the hasher instance that is passed to the hash(into:) method -- it is not intended to forbid calling finalize in general. Also note that replacing the instance is likewise prohibited.

In hashValue, explain that the compiler will take care of providing a suitable implementation.

@lorentey
Copy link
Member Author

lorentey commented May 3, 2022

@swift-ci smoke test

@lorentey lorentey merged commit 58dd343 into swiftlang:main May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants