summaryrefslogtreecommitdiff
path: root/src/syntax/pretty.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2021-08-21 16:38:51 +0200
committerLaurenz <laurmaedje@gmail.com>2021-08-21 17:30:21 +0200
commit0dd4ae0a7ac0c247078df492469ff20b8a90c886 (patch)
tree07a55343b9ccab3fe76b0f1b0de9d1be310d8b14 /src/syntax/pretty.rs
parentf38eb10c2b54bd13ccef119454839f6a66448462 (diff)
Prune derives
Diffstat (limited to 'src/syntax/pretty.rs')
-rw-r--r--src/syntax/pretty.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/syntax/pretty.rs b/src/syntax/pretty.rs
index cf9ee69d..3c59914f 100644
--- a/src/syntax/pretty.rs
+++ b/src/syntax/pretty.rs
@@ -94,14 +94,14 @@ impl Pretty for SyntaxNode {
Self::Emph(_) => p.push('_'),
Self::Text(text) => p.push_str(text),
Self::Raw(raw) => raw.pretty(p),
- Self::Heading(n) => n.pretty(p),
- Self::List(n) => n.pretty(p),
- Self::Enum(n) => n.pretty(p),
- Self::Expr(n) => {
- if n.has_short_form() {
+ Self::Heading(heading) => heading.pretty(p),
+ Self::List(list) => list.pretty(p),
+ Self::Enum(enum_) => enum_.pretty(p),
+ Self::Expr(expr) => {
+ if expr.has_short_form() {
p.push('#');
}
- n.pretty(p);
+ expr.pretty(p);
}
}
}
@@ -173,14 +173,14 @@ impl Pretty for HeadingNode {
}
}
-impl Pretty for ListItem {
+impl Pretty for ListNode {
fn pretty(&self, p: &mut Printer) {
p.push_str("- ");
self.body.pretty(p);
}
}
-impl Pretty for EnumItem {
+impl Pretty for EnumNode {
fn pretty(&self, p: &mut Printer) {
if let Some(number) = self.number {
write!(p, "{}", number).unwrap();