aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/main.rs b/src/main.rs
index 802d50e..6a1c37d 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -356,15 +356,9 @@ where
assert_eq!(r.len(), 0);
let mut indent = 2;
for node in nodes {
- match node {
- Node::Container(name, v) => {
- println!("{1:0$}{2}, {3}", indent, " ", name, v);
- indent += 2;
- },
- Node::Leaf(name, v, nv) => {
- println!("{1:0$}{2}, {3}", indent, " ", name, v);
- println!("{1:0$}{2:?}", indent + 2, " ", nv);
- },
+ println!("{1:0$}{2:?}", indent, " ", node);
+ if let Node::Container(_, _) = node {
+ indent += 2;
}
}
},