aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/render
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src/render')
-rw-r--r--crates/ide_completion/src/render/enum_variant.rs4
-rw-r--r--crates/ide_completion/src/render/function.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide_completion/src/render/enum_variant.rs b/crates/ide_completion/src/render/enum_variant.rs
index 374247b05..832f5ced1 100644
--- a/crates/ide_completion/src/render/enum_variant.rs
+++ b/crates/ide_completion/src/render/enum_variant.rs
@@ -6,7 +6,7 @@ use itertools::Itertools;
6 6
7use crate::{ 7use crate::{
8 item::{CompletionItem, CompletionKind, ImportEdit}, 8 item::{CompletionItem, CompletionKind, ImportEdit},
9 render::{builder_ext::Params, compute_exact_type_match, compute_ref_match, RenderContext}, 9 render::{builder_ext::Params, compute_ref_match, compute_type_match, RenderContext},
10 CompletionRelevance, 10 CompletionRelevance,
11}; 11};
12 12
@@ -77,7 +77,7 @@ impl<'a> EnumRender<'a> {
77 77
78 let ty = self.variant.parent_enum(self.ctx.completion.db).ty(self.ctx.completion.db); 78 let ty = self.variant.parent_enum(self.ctx.completion.db).ty(self.ctx.completion.db);
79 item.set_relevance(CompletionRelevance { 79 item.set_relevance(CompletionRelevance {
80 exact_type_match: compute_exact_type_match(self.ctx.completion, &ty), 80 type_match: compute_type_match(self.ctx.completion, &ty),
81 ..CompletionRelevance::default() 81 ..CompletionRelevance::default()
82 }); 82 });
83 83
diff --git a/crates/ide_completion/src/render/function.rs b/crates/ide_completion/src/render/function.rs
index b1eba20e8..d681e2c91 100644
--- a/crates/ide_completion/src/render/function.rs
+++ b/crates/ide_completion/src/render/function.rs
@@ -8,7 +8,7 @@ use syntax::ast::Fn;
8use crate::{ 8use crate::{
9 item::{CompletionItem, CompletionItemKind, CompletionKind, CompletionRelevance, ImportEdit}, 9 item::{CompletionItem, CompletionItemKind, CompletionKind, CompletionRelevance, ImportEdit},
10 render::{ 10 render::{
11 builder_ext::Params, compute_exact_name_match, compute_exact_type_match, compute_ref_match, 11 builder_ext::Params, compute_exact_name_match, compute_ref_match, compute_type_match,
12 RenderContext, 12 RenderContext,
13 }, 13 },
14}; 14};
@@ -73,7 +73,7 @@ impl<'a> FunctionRender<'a> {
73 73
74 let ret_type = self.func.ret_type(self.ctx.db()); 74 let ret_type = self.func.ret_type(self.ctx.db());
75 item.set_relevance(CompletionRelevance { 75 item.set_relevance(CompletionRelevance {
76 exact_type_match: compute_exact_type_match(self.ctx.completion, &ret_type), 76 type_match: compute_type_match(self.ctx.completion, &ret_type),
77 exact_name_match: compute_exact_name_match(self.ctx.completion, self.name.clone()), 77 exact_name_match: compute_exact_name_match(self.ctx.completion, self.name.clone()),
78 ..CompletionRelevance::default() 78 ..CompletionRelevance::default()
79 }); 79 });