Remove memoffset from dependencies
Nugine opened this issue · 5 comments
Nugine commented
I searched the usage of memoffset.
https://github.com/Manishearth/triomphe/search?q=offset_of
I find that there are only three offset_of!
and the layout of data structures are stable. So it's easy to replace the macro with simple constants.
Manishearth commented
Rust layout is absolutely not stable
Though there may be stdlib builtins for offset now
Nugine commented
Manishearth commented
Ah. I would still like to not have to rely on hardcoded constants here
But I think stdlib has ptr_addr_of if you want to get rid of the dep
Nugine commented
ptr::addr_of{_mut} are better but they are added since Rust 1.51.0. Do you have a MSRV policy?
Manishearth commented
Not really no