Skip to content

Commit

Permalink
if let -> match
Browse files Browse the repository at this point in the history
  • Loading branch information
jonas-schievink committed Apr 29, 2020
1 parent 15233a4 commit 0cd6a88
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions crates/ra_ide/src/completion/complete_qualified_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ pub(super) fn complete_qualified_path(acc: &mut Completions, ctx: &CompletionCon
let scope = ctx.scope();
let context_module = scope.module();

let res = if let Some(res) = scope.resolve_hir_path(&path) {
res
} else {
return;
let res = match scope.resolve_hir_path(&path) {
Some(res) => res,
None => return,
};

// Add associated types on type parameters and `Self`.
Expand Down

0 comments on commit 0cd6a88

Please sign in to comment.