This commit is contained in:
Aleksey Kladov 2018-12-22 01:01:40 +03:00
parent 200cc0a1e3
commit a8e04a7028
7 changed files with 181 additions and 167 deletions

View file

@ -1,8 +1,8 @@
use crate::{
completion::{CompletionItem, Completions, CompletionKind::*, SyntaxContext},
completion::{CompletionItem, Completions, CompletionKind::*, CompletionContext},
};
pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &SyntaxContext) {
pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) {
if !(ctx.is_trivial_path && ctx.enclosing_fn.is_some()) {
return;
}
@ -16,7 +16,7 @@ pub(super) fn complete_expr_snippet(acc: &mut Completions, ctx: &SyntaxContext)
.add_to(acc);
}
pub(super) fn complete_item_snippet(acc: &mut Completions, ctx: &SyntaxContext) {
pub(super) fn complete_item_snippet(acc: &mut Completions, ctx: &CompletionContext) {
if !ctx.is_new_item {
return;
}