From 00cdde2c5218020b8f6ec751042a436aeef923c7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 17 Oct 2018 19:52:25 +0300 Subject: Update rowan --- crates/ra_editor/src/symbols.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_editor/src/symbols.rs') diff --git a/crates/ra_editor/src/symbols.rs b/crates/ra_editor/src/symbols.rs index b768b34bc..c3c66680d 100644 --- a/crates/ra_editor/src/symbols.rs +++ b/crates/ra_editor/src/symbols.rs @@ -3,10 +3,10 @@ use crate::TextRange; use ra_syntax::{ algo::{ visit::{visitor, Visitor}, - walk::{walk, WalkEvent}, }, ast::{self, NameOwner}, AstNode, File, SmolStr, SyntaxKind, SyntaxNodeRef, + WalkEvent, }; #[derive(Debug, Clone)] @@ -54,7 +54,7 @@ pub fn file_structure(file: &File) -> Vec { let mut res = Vec::new(); let mut stack = Vec::new(); - for event in walk(file.syntax()) { + for event in file.syntax().preorder() { match event { WalkEvent::Enter(node) => match structure_node(node) { Some(mut symbol) => { @@ -64,7 +64,7 @@ pub fn file_structure(file: &File) -> Vec { } None => (), }, - WalkEvent::Exit(node) => { + WalkEvent::Leave(node) => { if structure_node(node).is_some() { stack.pop().unwrap(); } -- cgit v1.2.3