diff options
author | Wilfred Hughes <me@wilfred.me.uk> | 2022-01-23 11:13:20 -0800 |
---|---|---|
committer | Wilfred Hughes <me@wilfred.me.uk> | 2022-01-23 11:13:20 -0800 |
commit | 637eee8ff1e984b84927050d78e66c1d27f8262a (patch) | |
tree | 9313506d773688591cc1bb0263039422e3a60eb5 | |
parent | e63eb43c7b90d4fa6c2280b39a2176ccfa320e06 (diff) |
cargo fmt
-rw-r--r-- | src/tree_sitter_parser.rs | 1 | ||||
-rw-r--r-- | src/unchanged.rs | 20 |
2 files changed, 16 insertions, 5 deletions
diff --git a/src/tree_sitter_parser.rs b/src/tree_sitter_parser.rs index a5f714bcd2..403c34399a 100644 --- a/src/tree_sitter_parser.rs +++ b/src/tree_sitter_parser.rs @@ -432,7 +432,6 @@ pub fn parse_to_tree(src: &str, config: &TreeSitterConfig) -> (tree_sitter::Tree let tree = parser.parse(src, None).unwrap(); - let mut keyword_ish_capture_ids = vec![]; if let Some(idx) = config.highlight_query.capture_index_for_name("keyword") { keyword_ish_capture_ids.push(idx); diff --git a/src/unchanged.rs b/src/unchanged.rs index 6a88e6ff6e..ff522bf4fc 100644 --- a/src/unchanged.rs +++ b/src/unchanged.rs @@ -68,8 +68,14 @@ mod tests { let (lhs_after_skip, rhs_after_skip) = skip_unchanged_at_ends(&lhs_nodes, &rhs_nodes); - assert_eq!(lhs_nodes[0].change(), Some(ChangeKind::Unchanged(rhs_nodes[0]))); - assert_eq!(rhs_nodes[0].change(), Some(ChangeKind::Unchanged(lhs_nodes[0]))); + assert_eq!( + lhs_nodes[0].change(), + Some(ChangeKind::Unchanged(rhs_nodes[0])) + ); + assert_eq!( + rhs_nodes[0].change(), + Some(ChangeKind::Unchanged(lhs_nodes[0])) + ); assert_eq!(lhs_after_skip.len(), 2); assert_eq!(rhs_after_skip.len(), 1); @@ -86,8 +92,14 @@ mod tests { let (lhs_after_skip, rhs_after_skip) = skip_unchanged_at_ends(&lhs_nodes, &rhs_nodes); - assert_eq!(lhs_nodes[2].change(), Some(ChangeKind::Unchanged(rhs_nodes[1]))); - assert_eq!(rhs_nodes[1].change(), Some(ChangeKind::Unchanged(lhs_nodes[2]))); + assert_eq!( + lhs_nodes[2].change(), + Some(ChangeKind::Unchanged(rhs_nodes[1])) + ); + assert_eq!( + rhs_nodes[1].change(), + Some(ChangeKind::Unchanged(lhs_nodes[2])) + ); assert_eq!(lhs_after_skip.len(), 2); assert_eq!(rhs_after_skip.len(), 1); |