-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Closed
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.rust-2-breakage-wishlistIn the wishlist of breaking changes that requires rust 2.0In the wishlist of breaking changes that requires rust 2.0
Description
std::hash::Hasher
currently defines a finish()
method that returns a fixed type (u64
). This trait could be improved by changing the return type to some associated Output
type. I don't see a particular reason this wouldn't work, since, for instance, std::collections::HashMap
can simply provide a Hasher
which produces the type it expects. This would be nice as then types implementing std::hash::Hash
could be used with, for example, cryptographic hash functions. I am aware of the digest
crate intended for that use case, but I don't see a reason not to improve the existing trait.
aatifsyed
Metadata
Metadata
Assignees
Labels
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.rust-2-breakage-wishlistIn the wishlist of breaking changes that requires rust 2.0In the wishlist of breaking changes that requires rust 2.0