diff options
Diffstat (limited to 'crates/ra_editor/src/symbols.rs')
-rw-r--r-- | crates/ra_editor/src/symbols.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_editor/src/symbols.rs b/crates/ra_editor/src/symbols.rs index 917984177..e5cc5ca28 100644 --- a/crates/ra_editor/src/symbols.rs +++ b/crates/ra_editor/src/symbols.rs | |||
@@ -3,7 +3,7 @@ use ra_syntax::{ | |||
3 | ast::{self, NameOwner}, | 3 | ast::{self, NameOwner}, |
4 | algo::{ | 4 | algo::{ |
5 | visit::{visitor, Visitor}, | 5 | visit::{visitor, Visitor}, |
6 | walk::{walk, WalkEvent, preorder}, | 6 | walk::{walk, WalkEvent}, |
7 | }, | 7 | }, |
8 | }; | 8 | }; |
9 | use TextRange; | 9 | use TextRange; |
@@ -25,7 +25,7 @@ pub struct FileSymbol { | |||
25 | } | 25 | } |
26 | 26 | ||
27 | pub fn file_symbols(file: &File) -> Vec<FileSymbol> { | 27 | pub fn file_symbols(file: &File) -> Vec<FileSymbol> { |
28 | preorder(file.syntax()) | 28 | file.syntax().descendants() |
29 | .filter_map(to_symbol) | 29 | .filter_map(to_symbol) |
30 | .collect() | 30 | .collect() |
31 | } | 31 | } |