aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src/completions
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-05-28 13:38:09 +0100
committerLukas Wirth <[email protected]>2021-05-31 13:55:16 +0100
commitd346f5bf75bfe3c7dc357c748c257569c0fb23c3 (patch)
tree4ced7fd961a1f98467506dd4847fd877b75d2e47 /crates/ide_completion/src/completions
parentca49fbe0a1f6acc1352f6628c36bb7dfe3a950e5 (diff)
Less strings, more hir::Names
Diffstat (limited to 'crates/ide_completion/src/completions')
-rw-r--r--crates/ide_completion/src/completions/unqualified_path.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs
index 573a39996..83cb67101 100644
--- a/crates/ide_completion/src/completions/unqualified_path.rs
+++ b/crates/ide_completion/src/completions/unqualified_path.rs
@@ -52,14 +52,14 @@ pub(crate) fn complete_unqualified_path(acc: &mut Completions, ctx: &CompletionC
52 let ty = local.ty(ctx.db); 52 let ty = local.ty(ctx.db);
53 super::complete_fields(ctx, &ty, |field, ty| match field { 53 super::complete_fields(ctx, &ty, |field, ty| match field {
54 either::Either::Left(field) => { 54 either::Either::Left(field) => {
55 acc.add_field(ctx, Some(name.to_string()), field, &ty) 55 acc.add_field(ctx, Some(name.clone()), field, &ty)
56 } 56 }
57 either::Either::Right(tuple_idx) => { 57 either::Either::Right(tuple_idx) => {
58 acc.add_tuple_field(ctx, Some(name.to_string()), tuple_idx, &ty) 58 acc.add_tuple_field(ctx, Some(name.clone()), tuple_idx, &ty)
59 } 59 }
60 }); 60 });
61 super::complete_methods(ctx, &ty, |func| { 61 super::complete_methods(ctx, &ty, |func| {
62 acc.add_method(ctx, func, Some(name.to_string()), None) 62 acc.add_method(ctx, func, Some(name.clone()), None)
63 }); 63 });
64 } 64 }
65 } 65 }