aboutsummaryrefslogtreecommitdiff
path: root/crates/completion/src/completions
diff options
context:
space:
mode:
Diffstat (limited to 'crates/completion/src/completions')
-rw-r--r--crates/completion/src/completions/flyimport.rs2
-rw-r--r--crates/completion/src/completions/unqualified_path.rs2
2 files changed, 2 insertions, 2 deletions
diff --git a/crates/completion/src/completions/flyimport.rs b/crates/completion/src/completions/flyimport.rs
index 9c6a5a40c..c9f928483 100644
--- a/crates/completion/src/completions/flyimport.rs
+++ b/crates/completion/src/completions/flyimport.rs
@@ -175,7 +175,7 @@ fn compute_fuzzy_completion_order_key(
175 user_input_lowercased: &str, 175 user_input_lowercased: &str,
176) -> usize { 176) -> usize {
177 mark::hit!(certain_fuzzy_order_test); 177 mark::hit!(certain_fuzzy_order_test);
178 let proposed_import_name = match proposed_mod_path.segments.last() { 178 let proposed_import_name = match proposed_mod_path.segments().last() {
179 Some(name) => name.to_string().to_lowercase(), 179 Some(name) => name.to_string().to_lowercase(),
180 None => return usize::MAX, 180 None => return usize::MAX,
181 }; 181 };
diff --git a/crates/completion/src/completions/unqualified_path.rs b/crates/completion/src/completions/unqualified_path.rs
index 5d62fab97..e2482f959 100644
--- a/crates/completion/src/completions/unqualified_path.rs
+++ b/crates/completion/src/completions/unqualified_path.rs
@@ -63,7 +63,7 @@ fn complete_enum_variants(acc: &mut Completions, ctx: &CompletionContext, ty: &T
63 if let Some(path) = module.find_use_path(ctx.db, ModuleDef::from(variant)) { 63 if let Some(path) = module.find_use_path(ctx.db, ModuleDef::from(variant)) {
64 // Variants with trivial paths are already added by the existing completion logic, 64 // Variants with trivial paths are already added by the existing completion logic,
65 // so we should avoid adding these twice 65 // so we should avoid adding these twice
66 if path.segments.len() > 1 { 66 if path.segments().len() > 1 {
67 acc.add_qualified_enum_variant(ctx, variant, path); 67 acc.add_qualified_enum_variant(ctx, variant, path);
68 } 68 }
69 } 69 }