diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-02 16:51:39 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-10-02 16:51:39 +0100 |
commit | 248ee0c3fe333f9180f8c9d9dfd4efcc6886b5bc (patch) | |
tree | f94bb3a8bd47e3612ef29e815532c07d7871fa0f /crates/ra_editor/src/typing.rs | |
parent | 7ffc114dab6d1e25ead195a5937cd4f9ca51ef2c (diff) | |
parent | 1a2a8dec14ec04ea8eeccae99fd885e7a280e45b (diff) |
Merge #90
90: Inherent traversal r=matklad a=matklad
bors r+
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_editor/src/typing.rs')
-rw-r--r-- | crates/ra_editor/src/typing.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_editor/src/typing.rs b/crates/ra_editor/src/typing.rs index 0f4e7e0d0..512076941 100644 --- a/crates/ra_editor/src/typing.rs +++ b/crates/ra_editor/src/typing.rs | |||
@@ -4,7 +4,6 @@ use ra_syntax::{ | |||
4 | TextUnit, TextRange, SyntaxNodeRef, File, AstNode, SyntaxKind, | 4 | TextUnit, TextRange, SyntaxNodeRef, File, AstNode, SyntaxKind, |
5 | ast, | 5 | ast, |
6 | algo::{ | 6 | algo::{ |
7 | walk::preorder, | ||
8 | find_covering_node, | 7 | find_covering_node, |
9 | }, | 8 | }, |
10 | text_utils::{intersect, contains_offset_nonstrict}, | 9 | text_utils::{intersect, contains_offset_nonstrict}, |
@@ -33,7 +32,7 @@ pub fn join_lines(file: &File, range: TextRange) -> LocalEdit { | |||
33 | }; | 32 | }; |
34 | let node = find_covering_node(file.syntax(), range); | 33 | let node = find_covering_node(file.syntax(), range); |
35 | let mut edit = EditBuilder::new(); | 34 | let mut edit = EditBuilder::new(); |
36 | for node in preorder(node) { | 35 | for node in node.descendants() { |
37 | let text = match node.leaf_text() { | 36 | let text = match node.leaf_text() { |
38 | Some(text) => text, | 37 | Some(text) => text, |
39 | None => continue, | 38 | None => continue, |