summaryrefslogtreecommitdiff
path: root/src/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'src/syntax')
-rw-r--r--src/syntax/pretty.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/syntax/pretty.rs b/src/syntax/pretty.rs
index 62ecb8cd..e74829b0 100644
--- a/src/syntax/pretty.rs
+++ b/src/syntax/pretty.rs
@@ -21,6 +21,7 @@ pub trait Pretty {
}
/// A buffer into which items can be pretty printed.
+#[derive(Default)]
pub struct Printer {
buf: String,
}
@@ -28,7 +29,7 @@ pub struct Printer {
impl Printer {
/// Create a new pretty printer.
pub fn new() -> Self {
- Self { buf: String::new() }
+ Self::default()
}
/// Push a character into the buffer.