Skip to content

Commit

Permalink
Resolve clippy finding 'error: this map_or can be simplified'
Browse files Browse the repository at this point in the history
  • Loading branch information
dbast authored and astro committed Feb 23, 2025
1 parent e80dd87 commit 1a041dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/edit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ fn dead_to_edit(dead_code: DeadCode) -> Option<Edit> {
} else {
let mut tokens = pattern.syntax().children_with_tokens().skip_while(|node| {
node.as_node()
.map_or(true, |node| *node != dead_code.binding.decl_node)
.is_none_or(|node| *node != dead_code.binding.decl_node)
});
tokens.next();
for token in tokens {
Expand Down

0 comments on commit 1a041dc

Please sign in to comment.