mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Collapse more CompletionContext booleans into enums
This commit is contained in:
parent
d6ed315806
commit
7de925b8ab
6 changed files with 133 additions and 98 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue