diff options
Diffstat (limited to 'crates/ra_editor/src/extend_selection.rs')
-rw-r--r-- | crates/ra_editor/src/extend_selection.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_editor/src/extend_selection.rs b/crates/ra_editor/src/extend_selection.rs index dc914a26a..2f8a04b2b 100644 --- a/crates/ra_editor/src/extend_selection.rs +++ b/crates/ra_editor/src/extend_selection.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use ra_syntax::{ | 1 | use ra_syntax::{ |
2 | File, TextRange, SyntaxNodeRef, TextUnit, | 2 | File, TextRange, SyntaxNodeRef, TextUnit, |
3 | SyntaxKind::*, | 3 | SyntaxKind::*, |
4 | algo::{find_leaf_at_offset, LeafAtOffset, find_covering_node, ancestors, Direction, siblings}, | 4 | algo::{find_leaf_at_offset, LeafAtOffset, find_covering_node, Direction, siblings}, |
5 | }; | 5 | }; |
6 | 6 | ||
7 | pub fn extend_selection(file: &File, range: TextRange) -> Option<TextRange> { | 7 | pub fn extend_selection(file: &File, range: TextRange) -> Option<TextRange> { |
@@ -30,7 +30,7 @@ pub(crate) fn extend(root: SyntaxNodeRef, range: TextRange) -> Option<TextRange> | |||
30 | } | 30 | } |
31 | } | 31 | } |
32 | 32 | ||
33 | match ancestors(node).skip_while(|n| n.range() == range).next() { | 33 | match node.ancestors().skip_while(|n| n.range() == range).next() { |
34 | None => None, | 34 | None => None, |
35 | Some(parent) => Some(parent.range()), | 35 | Some(parent) => Some(parent.range()), |
36 | } | 36 | } |