contain-rs / linked-hash-map

A HashMap wrapper that holds key-value pairs in insertion order
https://contain-rs.github.io/linked-hash-map/linked_hash_map/
Apache License 2.0
169 stars 60 forks source link

add repr(transparent) to Qey #101

Closed konsumlamm closed 3 years ago

konsumlamm commented 4 years ago

#[repr(transparent)] guarantees that Qey<Q> has the same memory layout as Q (https://doc.rust-lang.org/nomicon/other-reprs.html#reprtransparent). This is required for Qey::from_ref to be safe.

FlashCat commented 4 years ago

Thanks for the pull request, and welcome! The contain-rs team is excited to review your changes, and you should hear from @cgaebel (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Gankra commented 3 years ago

thanks!