3 ms·
The standard method name also makes it super easy to go back and tighten things up when the time comes I recently had a nontrivial project where I'd used maybe
by brundolf 4y ago
The standard method name also makes it super easy to go back and tighten things up when the time comes
I recently had a nontrivial project where I'd used maybe a dozen unwrap()s in different places and had gotten a handful of bug reports for resulting panics. So I decided to make a pass and finally clean them up
Project-wide search for unwrap(), went through and properly handled all of them, very quickly and easily plugged all the holes, no more panics being reported
- echelon 4y agoIt's also something you can do static analysis for with tools, and I imagine the compiler can be adjusted to warn or disallow its use in modules and dependencies.