Oddbean new post about | logout
 Using `.unwrap()` is not "bad," per se. It is just frequently misused. Utilizing something like `match` or `if let` provides a more idomatic way of handling both expected and unexpected error-cases without causing your application to come to a grinding halt. One such example includes needing it to exit, but wanting to clean up artifacts. Another is creating and handling abstracted error types. Regardless, a good rule of thumb is only to use `.unwrap()` when you anticipate the desired failure outcome should be a panic.