diff options
author | Aleksey Kladov <[email protected]> | 2018-08-16 10:51:40 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-08-16 10:51:40 +0100 |
commit | 7094291573dc819e3115950ec3b2316bd5e9ea33 (patch) | |
tree | be18ef6c5baab68acac484d00277125484d15820 /crates/libeditor/src/code_actions.rs | |
parent | 1193c5f829dc96683132c12d5395d7805787af2a (diff) |
tt-attrs
Diffstat (limited to 'crates/libeditor/src/code_actions.rs')
-rw-r--r-- | crates/libeditor/src/code_actions.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/libeditor/src/code_actions.rs b/crates/libeditor/src/code_actions.rs index 88c348436..4987964d2 100644 --- a/crates/libeditor/src/code_actions.rs +++ b/crates/libeditor/src/code_actions.rs | |||
@@ -66,7 +66,7 @@ fn find_non_trivia_leaf(syntax: SyntaxNodeRef, offset: TextUnit) -> Option<Synta | |||
66 | .find(|leaf| !leaf.kind().is_trivia()) | 66 | .find(|leaf| !leaf.kind().is_trivia()) |
67 | } | 67 | } |
68 | 68 | ||
69 | fn find_node<'a, N: AstNode<&'a SyntaxRoot>>(syntax: SyntaxNodeRef<'a>, offset: TextUnit) -> Option<N> { | 69 | pub fn find_node<'a, N: AstNode<&'a SyntaxRoot>>(syntax: SyntaxNodeRef<'a>, offset: TextUnit) -> Option<N> { |
70 | let leaf = find_non_trivia_leaf(syntax, offset)?; | 70 | let leaf = find_non_trivia_leaf(syntax, offset)?; |
71 | ancestors(leaf) | 71 | ancestors(leaf) |
72 | .filter_map(N::cast) | 72 | .filter_map(N::cast) |