From eb4004fdb8f4cef602581d1fb35e515748d586cb Mon Sep 17 00:00:00 2001 From: Mikhail Rakhmanov Date: Thu, 11 Jun 2020 14:32:14 +0200 Subject: Add todo --- crates/ra_ide/src/completion/patterns.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crates/ra_ide/src') diff --git a/crates/ra_ide/src/completion/patterns.rs b/crates/ra_ide/src/completion/patterns.rs index b55f23fbe..145f01786 100644 --- a/crates/ra_ide/src/completion/patterns.rs +++ b/crates/ra_ide/src/completion/patterns.rs @@ -100,7 +100,8 @@ fn previous_non_triva_element(element: SyntaxElement) -> Option { })?; non_trivia_sibling(NodeOrToken::Node(prev_sibling_node), Direction::Prev)? }; - //I think you can avoid this loop if you use SyntaxToken::prev_token -- unlike prev_sibling_or_token, it works across parents. + // TODO: Check if this can be simplified + // Matklad: I think you can avoid this loop if you use SyntaxToken::prev_token -- unlike prev_sibling_or_token, it works across parents. // traversing the tree down to get the last token or node, i.e. the closest one loop { if let Some(token) = wrapped.as_token() { -- cgit v1.2.3