aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src/symbols.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2018-10-02 16:51:39 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2018-10-02 16:51:39 +0100
commit248ee0c3fe333f9180f8c9d9dfd4efcc6886b5bc (patch)
treef94bb3a8bd47e3612ef29e815532c07d7871fa0f /crates/ra_editor/src/symbols.rs
parent7ffc114dab6d1e25ead195a5937cd4f9ca51ef2c (diff)
parent1a2a8dec14ec04ea8eeccae99fd885e7a280e45b (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/symbols.rs')
-rw-r--r--crates/ra_editor/src/symbols.rs4
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};
9use TextRange; 9use TextRange;
@@ -25,7 +25,7 @@ pub struct FileSymbol {
25} 25}
26 26
27pub fn file_symbols(file: &File) -> Vec<FileSymbol> { 27pub 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}