diff options
Diffstat (limited to 'crates/ra_syntax/src/utils.rs')
-rw-r--r-- | crates/ra_syntax/src/utils.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/utils.rs b/crates/ra_syntax/src/utils.rs index 7d0ef2fa2..8ee02724d 100644 --- a/crates/ra_syntax/src/utils.rs +++ b/crates/ra_syntax/src/utils.rs | |||
@@ -5,7 +5,7 @@ use std::fmt::Write; | |||
5 | 5 | ||
6 | /// Parse a file and create a string representation of the resulting parse tree. | 6 | /// Parse a file and create a string representation of the resulting parse tree. |
7 | pub fn dump_tree(syntax: SyntaxNodeRef) -> String { | 7 | pub fn dump_tree(syntax: SyntaxNodeRef) -> String { |
8 | let mut errors: Vec<_> = syntax.root_data().iter().cloned().collect(); | 8 | let mut errors: Vec<_> = syntax.root_data().to_vec(); |
9 | errors.sort_by_key(|e| e.offset); | 9 | errors.sort_by_key(|e| e.offset); |
10 | let mut err_pos = 0; | 10 | let mut err_pos = 0; |
11 | let mut level = 0; | 11 | let mut level = 0; |
@@ -42,7 +42,7 @@ pub fn dump_tree(syntax: SyntaxNodeRef) -> String { | |||
42 | writeln!(buf, "err: `{}`", err.msg).unwrap(); | 42 | writeln!(buf, "err: `{}`", err.msg).unwrap(); |
43 | } | 43 | } |
44 | 44 | ||
45 | return buf; | 45 | buf |
46 | } | 46 | } |
47 | 47 | ||
48 | pub fn check_fuzz_invariants(text: &str) { | 48 | pub fn check_fuzz_invariants(text: &str) { |