Deduplicate

This commit is contained in:
Lukas Wirth 2022-06-03 16:33:37 +02:00
parent 522f66545f
commit 2a60b8452e
5 changed files with 27 additions and 70 deletions

View file

@ -178,8 +178,7 @@ pub(crate) fn complete_expr_path(acc: &mut Completions, ctx: &CompletionContext)
});
if !is_func_update {
let mut add_keyword =
|kw, snippet| super::keyword::add_keyword(acc, ctx, kw, snippet);
let mut add_keyword = |kw, snippet| acc.add_keyword_snippet(ctx, kw, snippet);
if ctx.expects_expression() {
if !in_block_expr {