What it does
A new lint that checks for calls of the form Option::zip with None as the right hand side. This always yields None and is never going to be correct as one could just write None. rust-lang/rust-analyzer#22924 is an example of a logic bug where the indent was to instead tuple the option with a None.
Advantage
No response
Drawbacks
No response
Example
Could be written as:
if intended, or foo.map(|foo| (foo, None)) if the intent was completely different and thus a bug to be written that way.
Comparison with existing lints
No response
Additional Context
No response
What it does
A new lint that checks for calls of the form
Option::zipwithNoneas the right hand side. This always yieldsNoneand is never going to be correct as one could just writeNone. rust-lang/rust-analyzer#22924 is an example of a logic bug where the indent was to instead tuple the option with aNone.Advantage
No response
Drawbacks
No response
Example
Could be written as:
Noneif intended, or
foo.map(|foo| (foo, None))if the intent was completely different and thus a bug to be written that way.Comparison with existing lints
No response
Additional Context
No response