3 ms·
That's... simply not true. Pointer arithmetic is not, in general, safe. Example: https://doc.rust-lang.org/std/primitive.pointer.html#method.add https://doc.rus
by zesterer 2y ago
That's... simply not true. Pointer arithmetic is not, in general, safe. Example: https://doc.rust-lang.org/std/primitive.pointer.html#method.add https://doc.rust-lang.org/std/primitive.pointer.html#method....
- gpm 2y agoEh... the ptr::add function exists if you want to make extra promises to the compiler to let it optimize better, but if you don't a safe version exists: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_add https://doc.rust-lang.org/std/primitive.pointer.html#method....