Stop using ptr casts so much
withoutboats opened this issue · 2 comments
withoutboats commented
Unfortunately I am an old Rustacean and I write bad code, so I get the address of a slice by writing:
let addr = slice as *const [_] as *const () as usize;or the moral equivalent. When what I should write is:
let addr = slice.as_ptr() as usize;This latter way is easier to review, clearer, and more solid in the face or refactors.
hirrolot commented
I can take this issue. OK?
withoutboats commented
Thanks for fixing this!