aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/src/code_actions.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-08-16 10:51:40 +0100
committerAleksey Kladov <[email protected]>2018-08-16 10:51:40 +0100
commit7094291573dc819e3115950ec3b2316bd5e9ea33 (patch)
treebe18ef6c5baab68acac484d00277125484d15820 /crates/libeditor/src/code_actions.rs
parent1193c5f829dc96683132c12d5395d7805787af2a (diff)
tt-attrs
Diffstat (limited to 'crates/libeditor/src/code_actions.rs')
-rw-r--r--crates/libeditor/src/code_actions.rs2
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
69fn find_node<'a, N: AstNode<&'a SyntaxRoot>>(syntax: SyntaxNodeRef<'a>, offset: TextUnit) -> Option<N> { 69pub 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)