Closed
Description
Summary
Use of match, matching Result
or Option
; do not trigger clippy::redundant_pattern_matching
Reproducer
I tried this code:
match Err::<i32, i32>(55) {
Ok(_) => true,
_ => false,
};
I expected to see this happen:
Err::<i32, i32>(55).is_ok();
Instead, this happened:
match Err::<i32, i32>(55) {
Ok(_) => true,
_ => false,
};
Version
rustc 1.71.0-nightly (b628260df 2023-04-22)
binary: rustc
commit-hash: b628260df0587ae559253d8640ecb8738d3de613
commit-date: 2023-04-22
host: x86_64-unknown-linux-gnu
release: 1.71.0-nightly
LLVM version: 16.0.2
Additional Labels
No response