if let -> match

This commit is contained in:
Jonas Schievink 2020-04-30 00:10:15 +02:00
parent 15233a467d
commit 0cd6a88cf6

View file

@ -15,10 +15,9 @@ pub(super) fn complete_qualified_path(acc: &mut Completions, ctx: &CompletionCon
let scope = ctx.scope(); let scope = ctx.scope();
let context_module = scope.module(); let context_module = scope.module();
let res = if let Some(res) = scope.resolve_hir_path(&path) { let res = match scope.resolve_hir_path(&path) {
res Some(res) => res,
} else { None => return,
return;
}; };
// Add associated types on type parameters and `Self`. // Add associated types on type parameters and `Self`.