aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src/typing.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-02 16:02:57 +0100
committerAleksey Kladov <[email protected]>2018-10-02 16:02:57 +0100
commitd323c81d5cc6a198239285abcede2166181d8f39 (patch)
tree02c64a01b14d893df439a9e90797db6d58c5a54d /crates/ra_editor/src/typing.rs
parentdccaa5e45e9baaa2d286353a7499a89af1669e42 (diff)
make ancestors and descendants inherent
Diffstat (limited to 'crates/ra_editor/src/typing.rs')
-rw-r--r--crates/ra_editor/src/typing.rs3
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,