You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(search_is_some): Move some logic for transforming closures
The lint `search_is_some` involves converting a closure that takes the
reference into one that takes the value. The code is split between the
function for the lint and a shared function. The new feature that we
are adding involves the same transformation. To do so it needs some of
the same code that is currently in the `search_is_some` lint. So it is
moved from the lint into the shared function.
Before this patch, line 799 in the file `clippy_utils/src/sugg.rs` had a
check. It made the function return none in case the closure did not
dereference the argument. However, the code for the lint
`search_is_some` would then fall back to using the original closure.
That achieved the same effect as the check not existing. So the check
is now removed.
0 commit comments