Lokathor / bytemuck

A crate for mucking around with piles of bytes
https://docs.rs/bytemuck
Apache License 2.0
697 stars 77 forks source link

Allow generics in `derive(ByteEq, ByteHash)`. #219

Closed zachs18 closed 3 months ago

zachs18 commented 8 months ago

Closes #217

Note that the ergonomics of derive(ByteEq, ByteHash) on a generic type are still not great, since NoUninit (or Pod) is required but cannot be derived (note the manual impl in the added doctests), but derive(NoUninit) explicitly doesn't support generics and gives a better error message, instead of silently ignoring generics like derive(ByteEq, ByteHash) used to, so this is strictly an improvement.

Lokathor commented 7 months ago

Passing this review off to @fu5ha , time permitting