Skip to content

Commit 8b6ea15

Browse files
committed
simplify
1 parent 71cd67f commit 8b6ea15

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

crates/ide_completion/src/completions/unqualified_path.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,11 @@ pub(crate) fn complete_unqualified_path(acc: &mut Completions, ctx: &CompletionC
8484
}
8585

8686
ctx.process_all_names(&mut |name, res| {
87-
if let ScopeDef::GenericParam(hir::GenericParam::LifetimeParam(_)) | ScopeDef::Label(_) =
88-
res
89-
{
90-
cov_mark::hit!(unqualified_skip_lifetime_completion);
91-
return;
92-
}
9387
let add_resolution = match res {
88+
ScopeDef::GenericParam(hir::GenericParam::LifetimeParam(_)) | ScopeDef::Label(_) => {
89+
cov_mark::hit!(unqualified_skip_lifetime_completion);
90+
return;
91+
}
9492
ScopeDef::ImplSelfType(_) => {
9593
!ctx.previous_token_is(syntax::T![impl]) && !ctx.previous_token_is(syntax::T![for])
9694
}

0 commit comments

Comments
 (0)