« first day (3081 days earlier)      last day (400 days later) » 

12:27 PM
Hi, I'd like to get the index of an array element to which I only have a raw pointer. In C I'd simply subtract (appropriately typed) pointers. How to do this in Rust?
Oh I just found it. doc.rust-lang.org/std/… This should do the trick. Have been looking in the wrong place. Sorry for the disturbance, empty chat ;-)
 
12:48 PM
Ah yes - I have also seen that and would gladly use it if it was stable. I'll make one of my ugly "TODO: use sub_ptr() instead once stable" comments...
 

« first day (3081 days earlier)      last day (400 days later) »