diff options
author | Aleksey Kladov <[email protected]> | 2018-07-31 13:40:40 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2018-07-31 13:40:40 +0100 |
commit | 9ce7e8110254e8db476c96bce2eecb2d16983159 (patch) | |
tree | abaddbafc4593948849394b430e3bde5c624fa22 /src/utils.rs | |
parent | 2a2815266b35de12bd3c48cc405e8b3e8fcf8885 (diff) |
cleanups
Diffstat (limited to 'src/utils.rs')
-rw-r--r-- | src/utils.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils.rs b/src/utils.rs index 826a7d60b..f99d31b36 100644 --- a/src/utils.rs +++ b/src/utils.rs | |||
@@ -16,7 +16,7 @@ pub fn dump_tree(syntax: &SyntaxNode) -> String { | |||
16 | errors: &mut BTreeSet<SyntaxError>, | 16 | errors: &mut BTreeSet<SyntaxError>, |
17 | ) { | 17 | ) { |
18 | buff.push_str(&String::from(" ").repeat(level)); | 18 | buff.push_str(&String::from(" ").repeat(level)); |
19 | write!(buff, "{:?}\n", node).unwrap(); | 19 | writeln!(buff, "{:?}", node).unwrap(); |
20 | let my_errors: Vec<_> = errors | 20 | let my_errors: Vec<_> = errors |
21 | .iter() | 21 | .iter() |
22 | .filter(|e| e.offset == node.range().start()) | 22 | .filter(|e| e.offset == node.range().start()) |
@@ -25,7 +25,7 @@ pub fn dump_tree(syntax: &SyntaxNode) -> String { | |||
25 | for err in my_errors { | 25 | for err in my_errors { |
26 | errors.remove(&err); | 26 | errors.remove(&err); |
27 | buff.push_str(&String::from(" ").repeat(level)); | 27 | buff.push_str(&String::from(" ").repeat(level)); |
28 | write!(buff, "err: `{}`\n", err.message).unwrap(); | 28 | writeln!(buff, "err: `{}`", err.message).unwrap(); |
29 | } | 29 | } |
30 | 30 | ||
31 | for child in node.children() { | 31 | for child in node.children() { |
@@ -40,7 +40,7 @@ pub fn dump_tree(syntax: &SyntaxNode) -> String { | |||
40 | for err in my_errors { | 40 | for err in my_errors { |
41 | errors.remove(&err); | 41 | errors.remove(&err); |
42 | buff.push_str(&String::from(" ").repeat(level)); | 42 | buff.push_str(&String::from(" ").repeat(level)); |
43 | write!(buff, "err: `{}`\n", err.message).unwrap(); | 43 | writeln!(buff, "err: `{}`", err.message).unwrap(); |
44 | } | 44 | } |
45 | } | 45 | } |
46 | } | 46 | } |