Make the Resolution variants tuple variants

This commit is contained in:
Florian Diebold 2019-01-30 22:41:44 +01:00
parent d3df80dfe4
commit d571d26955
7 changed files with 41 additions and 53 deletions

View file

@ -12,7 +12,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
_ => return,
};
let def = match ctx.resolver.resolve_path(ctx.db, &path).take_types() {
Some(Resolution::Def { def }) => def,
Some(Resolution::Def(def)) => def,
_ => return,
};
match def {
@ -24,7 +24,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) {
ctx.source_range(),
name.to_string(),
)
.from_resolution(ctx, &res.def.map(|def| hir::Resolution::Def { def }))
.from_resolution(ctx, &res.def.map(hir::Resolution::Def))
.add_to(acc);
}
}