aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-05-04 14:07:09 +0100
committerAleksey Kladov <[email protected]>2020-05-04 14:32:23 +0100
commit71f6d58e310af0f67fba8bb9f59ea9777ecf24d0 (patch)
tree1db4400a4b8f525a0579ecf5f615f483ccb31e30 /crates/ra_ide
parentd7450222a97cb9abefc4fd843ae9d6f4d0d0f93f (diff)
Remove unnecessary condition
No tests fail, and quick manual testing shows that there are no false-positives. In general, each completion contributor should be independent from the others.
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/completion.rs31
1 files changed, 14 insertions, 17 deletions
diff --git a/crates/ra_ide/src/completion.rs b/crates/ra_ide/src/completion.rs
index a0e06faa2..8bdc43b1a 100644
--- a/crates/ra_ide/src/completion.rs
+++ b/crates/ra_ide/src/completion.rs
@@ -65,23 +65,20 @@ pub(crate) fn completions(
65 let ctx = CompletionContext::new(db, position, config)?; 65 let ctx = CompletionContext::new(db, position, config)?;
66 66
67 let mut acc = Completions::default(); 67 let mut acc = Completions::default();
68 if ctx.attribute_under_caret.is_some() { 68 complete_attribute::complete_attribute(&mut acc, &ctx);
69 complete_attribute::complete_attribute(&mut acc, &ctx); 69 complete_fn_param::complete_fn_param(&mut acc, &ctx);
70 } else { 70 complete_keyword::complete_expr_keyword(&mut acc, &ctx);
71 complete_fn_param::complete_fn_param(&mut acc, &ctx); 71 complete_keyword::complete_use_tree_keyword(&mut acc, &ctx);
72 complete_keyword::complete_expr_keyword(&mut acc, &ctx); 72 complete_snippet::complete_expr_snippet(&mut acc, &ctx);
73 complete_keyword::complete_use_tree_keyword(&mut acc, &ctx); 73 complete_snippet::complete_item_snippet(&mut acc, &ctx);
74 complete_snippet::complete_expr_snippet(&mut acc, &ctx); 74 complete_qualified_path::complete_qualified_path(&mut acc, &ctx);
75 complete_snippet::complete_item_snippet(&mut acc, &ctx); 75 complete_unqualified_path::complete_unqualified_path(&mut acc, &ctx);
76 complete_qualified_path::complete_qualified_path(&mut acc, &ctx); 76 complete_dot::complete_dot(&mut acc, &ctx);
77 complete_unqualified_path::complete_unqualified_path(&mut acc, &ctx); 77 complete_record::complete_record(&mut acc, &ctx);
78 complete_dot::complete_dot(&mut acc, &ctx); 78 complete_pattern::complete_pattern(&mut acc, &ctx);
79 complete_record::complete_record(&mut acc, &ctx); 79 complete_postfix::complete_postfix(&mut acc, &ctx);
80 complete_pattern::complete_pattern(&mut acc, &ctx); 80 complete_macro_in_item_position::complete_macro_in_item_position(&mut acc, &ctx);
81 complete_postfix::complete_postfix(&mut acc, &ctx); 81 complete_trait_impl::complete_trait_impl(&mut acc, &ctx);
82 complete_macro_in_item_position::complete_macro_in_item_position(&mut acc, &ctx);
83 complete_trait_impl::complete_trait_impl(&mut acc, &ctx);
84 }
85 82
86 Some(acc) 83 Some(acc)
87} 84}