3 ms·
Moreover, now they realize this is an issue for them, they can just do "Ctrl+F unwrap" and fix each instance. Then they can put a hook on their commits that aut
by ModernMech 11mo ago
Moreover, now they realize this is an issue for them, they can just do "Ctrl+F unwrap" and fix each instance. Then they can put a hook on their commits that automatically flag any code with "unwrap". In some languages where you're allowed to just ignore errors, you could fix the proximal bug, but you'd never be sure you weren't causing or ignoring more of the same in the future -- how do you search for what isn't there?
- deleted 11mo ago[deleted]
- hyghjiyhu 11mo agoDue to the unfortunate naming of unwrap_or and friends it's a little (but only a little) more complicated than ctrl-f.
- phi-go 11mo agoYou can also forbid unwraps as part of clippy.
- ChristianJacobs 11mo agoNot really. It's just "unwrap(" instead.