aboutsummaryrefslogtreecommitdiff
path: root/crates/ide_completion/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide_completion/src')
-rw-r--r--crates/ide_completion/src/completions/pattern.rs4
-rw-r--r--crates/ide_completion/src/render.rs2
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ide_completion/src/completions/pattern.rs b/crates/ide_completion/src/completions/pattern.rs
index 46cef58f0..476eecff0 100644
--- a/crates/ide_completion/src/completions/pattern.rs
+++ b/crates/ide_completion/src/completions/pattern.rs
@@ -26,11 +26,11 @@ pub(crate) fn complete_pattern(acc: &mut Completions, ctx: &CompletionContext) {
26 let add_resolution = match &res { 26 let add_resolution = match &res {
27 hir::ScopeDef::ModuleDef(def) => match def { 27 hir::ScopeDef::ModuleDef(def) => match def {
28 hir::ModuleDef::Adt(hir::Adt::Struct(strukt)) => { 28 hir::ModuleDef::Adt(hir::Adt::Struct(strukt)) => {
29 acc.add_struct_pat(ctx, strukt.clone(), Some(name.clone())); 29 acc.add_struct_pat(ctx, *strukt, Some(name.clone()));
30 true 30 true
31 } 31 }
32 hir::ModuleDef::Variant(variant) if !ctx.is_irrefutable_pat_binding => { 32 hir::ModuleDef::Variant(variant) if !ctx.is_irrefutable_pat_binding => {
33 acc.add_variant_pat(ctx, variant.clone(), Some(name.clone())); 33 acc.add_variant_pat(ctx, *variant, Some(name.clone()));
34 true 34 true
35 } 35 }
36 hir::ModuleDef::Adt(hir::Adt::Enum(..)) 36 hir::ModuleDef::Adt(hir::Adt::Enum(..))
diff --git a/crates/ide_completion/src/render.rs b/crates/ide_completion/src/render.rs
index 4e4923e0d..12921e12b 100644
--- a/crates/ide_completion/src/render.rs
+++ b/crates/ide_completion/src/render.rs
@@ -81,7 +81,7 @@ impl<'a> RenderContext<'a> {
81 } 81 }
82 82
83 fn snippet_cap(&self) -> Option<SnippetCap> { 83 fn snippet_cap(&self) -> Option<SnippetCap> {
84 self.completion.config.snippet_cap.clone() 84 self.completion.config.snippet_cap
85 } 85 }
86 86
87 fn db(&self) -> &'a RootDatabase { 87 fn db(&self) -> &'a RootDatabase {