Collapse more CompletionContext booleans into enums

This commit is contained in:
Lukas Wirth 2021-05-27 02:54:49 +02:00
parent d6ed315806
commit 7de925b8ab
6 changed files with 133 additions and 98 deletions

View file

@ -14,7 +14,7 @@ fn snippet(ctx: &CompletionContext, cap: SnippetCap, label: &str, snippet: &str)
}
pub(crate) fn complete_expr_snippet(acc: &mut Completions, ctx: &CompletionContext) {
if !(ctx.is_trivial_path && ctx.function_syntax.is_some()) {
if !(ctx.is_trivial_path && ctx.function_def.is_some()) {
return;
}
let cap = match ctx.config.snippet_cap {