Closed
Description
The get_unwrap lint suggests replacing x.get(y).unwrap()
with x[y]
. IMO, this is bad advice because the former syntax makes it clear that there's a risk of a panic, while the latter looks innocuous. It's generally good to be aware of where panics can happen. It's especially true when processing untrusted input, where a panic caused by user input is a Denial-of-Service vulnerability.
I propose that we make this lint non-default at the least, and possibly consider removing it.