aboutsummaryrefslogtreecommitdiff
path: root/crates/libeditor/src/symbols.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/libeditor/src/symbols.rs')
-rw-r--r--crates/libeditor/src/symbols.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/libeditor/src/symbols.rs b/crates/libeditor/src/symbols.rs
index 37cef6389..98a35dcdf 100644
--- a/crates/libeditor/src/symbols.rs
+++ b/crates/libeditor/src/symbols.rs
@@ -1,5 +1,5 @@
1use libsyntax2::{ 1use libsyntax2::{
2 SyntaxKind, SyntaxNodeRef, AstNode, ParsedFile, SmolStr, 2 SyntaxKind, SyntaxNodeRef, AstNode, File, SmolStr,
3 ast::{self, NameOwner}, 3 ast::{self, NameOwner},
4 algo::{ 4 algo::{
5 visit::{visitor, Visitor}, 5 visit::{visitor, Visitor},
@@ -24,7 +24,7 @@ pub struct FileSymbol {
24 pub kind: SyntaxKind, 24 pub kind: SyntaxKind,
25} 25}
26 26
27pub fn file_symbols(file: &ParsedFile) -> Vec<FileSymbol> { 27pub fn file_symbols(file: &File) -> Vec<FileSymbol> {
28 preorder(file.syntax()) 28 preorder(file.syntax())
29 .filter_map(to_symbol) 29 .filter_map(to_symbol)
30 .collect() 30 .collect()
@@ -52,7 +52,7 @@ fn to_symbol(node: SyntaxNodeRef) -> Option<FileSymbol> {
52} 52}
53 53
54 54
55pub fn file_structure(file: &ParsedFile) -> Vec<StructureNode> { 55pub fn file_structure(file: &File) -> Vec<StructureNode> {
56 let mut res = Vec::new(); 56 let mut res = Vec::new();
57 let mut stack = Vec::new(); 57 let mut stack = Vec::new();
58 58