|
|
|
|
|
by tialaramex
315 days ago
|
|
I've been hearing about how I'll inevitably write all this unsafe Rust for... four years now. Some time back I checked and I had written exactly one unsafe block, and so I inspected it again and I realised two things: 1. It was no longer necessary, Rust could now just do this safely. I rewrote it in safe Rust. 2. It was technically Undefined Behaviour, predictably given the chance to shoot myself in the foot that's exactly what I had done. Like a lot of C and C++ it likely wouldn't in fact blow my foot off in any real scenario, but who knows? Not me, that's for sure. |
|