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_syntax/src/utils.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'crates/ra_syntax/src/utils.rs') diff --git a/crates/ra_syntax/src/utils.rs b/crates/ra_syntax/src/utils.rs index 27248ff32..7d0ef2fa2 100644 --- a/crates/ra_syntax/src/utils.rs +++ b/crates/ra_syntax/src/utils.rs @@ -1,6 +1,5 @@ use crate::{ - algo::walk::{walk, WalkEvent}, - File, SyntaxKind, SyntaxNodeRef, + File, SyntaxKind, SyntaxNodeRef, WalkEvent }; use std::fmt::Write; @@ -19,7 +18,7 @@ pub fn dump_tree(syntax: SyntaxNodeRef) -> String { }; } - for event in walk(syntax) { + for event in syntax.preorder() { match event { WalkEvent::Enter(node) => { indent!(); @@ -34,7 +33,7 @@ pub fn dump_tree(syntax: SyntaxNodeRef) -> String { } level += 1; } - WalkEvent::Exit(_) => level -= 1, + WalkEvent::Leave(_) => level -= 1, } } -- cgit v1.2.3