assertions_on_result_states
leads to less clear tests
#9263
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Summary
IMO using
assert!(foo().is_err())
is clearer within a test to imply that the assertion is the point of the test rather thanfoo().unwrap_err()
.Lint Name
assertions_on_result_states
Reproducer
I tried this code:
I saw this happen:
I expected to see this happen:
Version
Additional Labels
No response
The text was updated successfully, but these errors were encountered: