Some(_) is not equivalent to is_some() #5746
Labels
A-documentation
Area: Adding or improving documentation
C-bug
Category: Clippy is not doing the correct thing
E-hard
Call for participation: This a hard problem and requires more experience or effort to work on
good-first-issue
These issues are a good way to get started with Clippy
I found a situation in which
if let Some(_) = func()
andif func().is_some()
don't do the same thing. In particular, the latter deadlocks while the former doesn't. This is relevant for the redundant_pattern_matching lint. I replicated this behavior in debug and release mode with rustc 1.44.0.Here is the situation
The text was updated successfully, but these errors were encountered: