fix: Cleanup param name inlay hint filtering

This commit is contained in:
Lukas Wirth 2025-03-31 07:43:08 +02:00
parent fb133c8c80
commit 2b382eb772
7 changed files with 188 additions and 119 deletions

View file

@ -121,7 +121,7 @@ pub fn walk_patterns_in_expr(start: &ast::Expr, cb: &mut dyn FnMut(ast::Pat)) {
match ast::Stmt::cast(node.clone()) {
Some(ast::Stmt::LetStmt(l)) => {
if let Some(pat) = l.pat() {
walk_pat(&pat, &mut |pat| {
_ = walk_pat(&pat, &mut |pat| {
cb(pat);
ControlFlow::<(), ()>::Continue(())
});
@ -159,7 +159,7 @@ pub fn walk_patterns_in_expr(start: &ast::Expr, cb: &mut dyn FnMut(ast::Pat)) {
}
} else if let Some(pat) = ast::Pat::cast(node) {
preorder.skip_subtree();
walk_pat(&pat, &mut |pat| {
_ = walk_pat(&pat, &mut |pat| {
cb(pat);
ControlFlow::<(), ()>::Continue(())
});