unnecessary_unwrap
doesn't lint following a binding name
#14725
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-negative
Issue: The lint should have been triggered on code, but wasn't
Summary
warn if there's a missed opportunity to make the code more clean and avoid an unnecessary unwrap. Even if you're using unwraps as a temporary placeholder before adding a full option handling later, you can't use this as an excuse to write your code the way that the propsed lint warns against because the concision level is superior with the approach I expected
Lint Name
unnecessary_unwrap
Reproducer
I tried this code:
I expected to see this happen:
give warning that suggests rewriting to this;
Instead, this happened:
silence
Version
The text was updated successfully, but these errors were encountered: