ringbahn/iou

Stop using ptr casts so much

withoutboats opened this issue · 2 comments

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.

I can take this issue. OK?

Thanks for fixing this!