minus-squaredarvit@lemmy.darvit.nltoProgrammer Humor@programming.dev•;DR blame the devlinkfedilinkarrow-up2·14 days agoFor my own Rust project I require myself to have a comment for every unwrap call that explains why that unwrap will never panic. For everything else I let the function return an error, with help of the anyhow crate and error contexts. linkfedilink
minus-squaredarvit@lemmy.darvit.nltoTechnology@lemmy.world•Microsoft wants to replace its entire C and C++ codebase, perhaps by 2030linkfedilinkEnglisharrow-up26·19 days agounsafe { <the whole codebase> } linkfedilink
For my own Rust project I require myself to have a comment for every unwrap call that explains why that unwrap will never panic. For everything else I let the function return an error, with help of the anyhow crate and error contexts.