From d323c81d5cc6a198239285abcede2166181d8f39 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 2 Oct 2018 18:02:57 +0300 Subject: make ancestors and descendants inherent --- crates/ra_syntax/src/utils.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 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 8bc5f0e24..e274f7471 100644 --- a/crates/ra_syntax/src/utils.rs +++ b/crates/ra_syntax/src/utils.rs @@ -1,6 +1,6 @@ use std::fmt::Write; use { - algo::walk::{preorder, walk, WalkEvent}, + algo::walk::{walk, WalkEvent}, SyntaxKind, File, SyntaxNodeRef }; @@ -56,7 +56,7 @@ pub fn check_fuzz_invariants(text: &str) { pub(crate) fn validate_block_structure(root: SyntaxNodeRef) { let mut stack = Vec::new(); - for node in preorder(root) { + for node in root.descendants() { match node.kind() { SyntaxKind::L_CURLY => { stack.push(node) -- cgit v1.2.3