File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed 
crates/pgt_treesitter/src/context Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ pub enum WrappingNode {
5757 List , 
5858} 
5959
60- 
6160impl  TryFrom < & str >  for  WrappingNode  { 
6261 type  Error  = String ; 
6362
@@ -646,9 +645,10 @@ impl<'a> TreesitterContext<'a> {
646645/// If the tree shows `relation > object_reference > identifier` and the "identifier" is a leaf node, 
647646/// you need to pass `&["relation", "object_reference"]`. 
648647pub  fn  matches_one_of_ancestors ( & self ,  expected_ancestors :  & [ & ' static  str ] )  -> bool  { 
649-  self . node_under_cursor 
650-  . as_ref ( ) 
651-  . is_some_and ( |node| node. parent ( ) . is_some_and ( |p| expected_ancestors. contains ( & p. kind ( ) ) ) ) 
648+  self . node_under_cursor . as_ref ( ) . is_some_and ( |node| { 
649+  node. parent ( ) 
650+  . is_some_and ( |p| expected_ancestors. contains ( & p. kind ( ) ) ) 
651+  } ) 
652652 } 
653653
654654 /// Checks whether the Node under the cursor is the nth child of the parent. 
@@ -787,7 +787,6 @@ mod tests {
787787
788788 use  pgt_test_utils:: QueryWithCursorPosition ; 
789789
790- 
791790 fn  get_tree ( input :  & str )  -> tree_sitter:: Tree  { 
792791 let  mut  parser = tree_sitter:: Parser :: new ( ) ; 
793792 parser
                         You can’t perform that action at this time. 
           
                  
0 commit comments