Gilnaa / memoffset

offsetof for Rust
MIT License
224 stars 29 forks source link

Add unstable_offset_of feature to use the unstable offset_of macro #72

Closed est31 closed 1 year ago

est31 commented 1 year ago

Add a cargo feature unstable_offset_of to use the unstable core::mem::offset_of!() macro (https://github.com/rust-lang/rust/issues/106655). This allows for unsized structs (#25) and many other things. It also helps with testing of the upstream offset_of macro: testing is now as easy as enabling this feature, one doesn't have to change the usages from memoffset::offset_of to core::mem::offset_of.

Gilnaa commented 1 year ago

Thank you very much. Will try to remember to publish it to crates.io tonight

est31 commented 1 year ago

Thanks @Gilnaa for the fast review! :heart:

Gilnaa commented 1 year ago

Failed to remember that night :) Anyway, published as v0.9.0, thanks again and have a nice weekend.

est31 commented 1 year ago

@Gilnaa thanks for having done the release!