aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/utils.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2018-10-02 16:02:57 +0100
committerAleksey Kladov <[email protected]>2018-10-02 16:02:57 +0100
commitd323c81d5cc6a198239285abcede2166181d8f39 (patch)
tree02c64a01b14d893df439a9e90797db6d58c5a54d /crates/ra_syntax/src/utils.rs
parentdccaa5e45e9baaa2d286353a7499a89af1669e42 (diff)
make ancestors and descendants inherent
Diffstat (limited to 'crates/ra_syntax/src/utils.rs')
-rw-r--r--crates/ra_syntax/src/utils.rs4
1 files changed, 2 insertions, 2 deletions
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 @@
1use std::fmt::Write; 1use std::fmt::Write;
2use { 2use {
3 algo::walk::{preorder, walk, WalkEvent}, 3 algo::walk::{walk, WalkEvent},
4 SyntaxKind, File, SyntaxNodeRef 4 SyntaxKind, File, SyntaxNodeRef
5}; 5};
6 6
@@ -56,7 +56,7 @@ pub fn check_fuzz_invariants(text: &str) {
56 56
57pub(crate) fn validate_block_structure(root: SyntaxNodeRef) { 57pub(crate) fn validate_block_structure(root: SyntaxNodeRef) {
58 let mut stack = Vec::new(); 58 let mut stack = Vec::new();
59 for node in preorder(root) { 59 for node in root.descendants() {
60 match node.kind() { 60 match node.kind() {
61 SyntaxKind::L_CURLY => { 61 SyntaxKind::L_CURLY => {
62 stack.push(node) 62 stack.push(node)