4 ms·
Rust does have manually-written error handling paths like that. See for example the panic handling in Vec.retain_mut: https://doc.rust-lang.org/src/alloc/vec/mo
by ridiculous_fish 3y ago
Rust does have manually-written error handling paths like that. See for example the panic handling in Vec.retain_mut: https://doc.rust-lang.org/src/alloc/vec/mod.rs.html#1577 https://doc.rust-lang.org/src/alloc/vec/mod.rs.html#1577
I doubt most crates handle these scenarios correctly.
- pornel 3y agoThis is limited to unsafe code, and the "exception safety" is a known problem to deal with. It can be tested without having to trigger OOM.