-
Notifications
You must be signed in to change notification settings - Fork 185
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
[breaking-change] use hash32 v0.3.0 #284
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nice improvement! |
Awesome ! Can’t wait to have it merged :) |
this release of `hash32` has the advantage that 32-bit hashers can be used to hash types that implement the `core::hash::Hash` trait removing the need for the `hash32::Hash` implementations in this crate and the uses of the `#[derive(Hash32)]` macro (which did not support enums) in dependent crates with this change the following code works ``` rust // NOTE no derive(Hash32) struct Int(i32); let mut x = FnvIndexSet::<_, 4>::default(); let _ = x.insert(Int(0)); ``` this change is technically a breaking change because the following code is no longer accepted ``` rust // assume this type comes from a dependency // NOTE no derive(Hash) struct Int(i32); let mut x = FnvIndexSet::<_, 4>::default(); let _ = x.insert(Int(0)); // error: does not implement Hash ```
to ensure we don't do another 0.7.x release by mistake
bors merge |
bors bot
added a commit
that referenced
this pull request
Aug 12, 2022
284: [breaking-change] use hash32 v0.3.0 r=japaric a=japaric this release of `hash32` has the advantage that 32-bit hashers can be used to hash types that implement the `core::hash::Hash` trait removing the need for the `hash32::Hash` implementations in this crate and the uses of the `#[derive(Hash32)]` macro (which did not support enums) in dependent crates with this change the following code works ``` rust // NOTE no derive(Hash32) #[derive(Hash)] struct Int(i32); let mut x = FnvIndexSet::<_, 4>::default(); let _ = x.insert(Int(0)); ``` this change is technically a breaking change because the following code is no longer accepted ``` rust // assume this type comes from a dependency // NOTE no derive(Hash) #[derive(Hash32)] struct Int(i32); let mut x = FnvIndexSet::<_, 4>::default(); let _ = x.insert(Int(0)); // error: does not implement Hash ``` Co-authored-by: Jorge Aparicio <jorge.aparicio@ferrous-systems.com>
Build failed: |
should work now that MSRV checks are gone |
Build succeeded: |
Thanks Japaric, awesome ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this release of
hash32
has the advantage that 32-bit hashers can be used to hash types thatimplement the
core::hash::Hash
trait removing the need for thehash32::Hash
implementations inthis crate and the uses of the
#[derive(Hash32)]
macro (which did not support enums) in dependentcrates
with this change the following code works
this change is technically a breaking change because the following code is no longer accepted