diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-28 18:32:58 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-28 18:32:58 +0100 |
| commit | 406de22ee5cd74dc6f67743bad4710415bb50c41 (patch) | |
| tree | 37536600378cd325956201ea175469bc22db2b1a /src/ide/complete.rs | |
| parent | 2d56e3c5e245bf8824bf0ea8f1f1a05cb9716dc5 (diff) | |
Remove method call syntax kind
Diffstat (limited to 'src/ide/complete.rs')
| -rw-r--r-- | src/ide/complete.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/ide/complete.rs b/src/ide/complete.rs index 83202e30..143e22b9 100644 --- a/src/ide/complete.rs +++ b/src/ide/complete.rs @@ -4,7 +4,7 @@ use if_chain::if_chain; use super::{analyze, plain_docs_sentence, summarize_font_family}; use crate::model::{methods_on, CastInfo, Scope, Value}; -use crate::syntax::{ast, LinkedNode, Source, SyntaxKind, SyntaxNode}; +use crate::syntax::{ast, LinkedNode, Source, SyntaxKind}; use crate::util::{format_eco, EcoString}; use crate::World; @@ -936,9 +936,7 @@ impl<'a> CompletionContext<'a> { if let Some(parent) = node.parent() { if let Some(v) = parent.cast::<ast::ForLoop>() { - if node.prev_sibling().as_deref().map(SyntaxNode::kind) - != Some(SyntaxKind::In) - { + if node.prev_sibling_kind() != Some(SyntaxKind::In) { let pattern = v.pattern(); if let Some(key) = pattern.key() { defined.insert(key.take()); |
