heapless icon indicating copy to clipboard operation
heapless copied to clipboard

[breaking-change] use hash32 v0.3.0

Open japaric opened this issue 3 years ago • 2 comments

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

// 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

// 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

japaric avatar Apr 29 '22 15:04 japaric

Nice improvement!

korken89 avatar May 01 '22 07:05 korken89

Awesome ! Can’t wait to have it merged :)

pwnorbitals avatar Aug 03 '22 17:08 pwnorbitals

bors merge

japaric avatar Aug 12 '22 13:08 japaric

Build failed:

bors[bot] avatar Aug 12 '22 14:08 bors[bot]

should work now that MSRV checks are gone bors merge

japaric avatar Aug 12 '22 14:08 japaric

Build succeeded:

bors[bot] avatar Aug 12 '22 14:08 bors[bot]

Thanks Japaric, awesome !

pwnorbitals avatar Aug 13 '22 10:08 pwnorbitals