diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-12-30 11:37:11 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-12-30 12:00:12 +0100 |
| commit | f5dcb84e36a38182218c7f907b861b12d2bd2c1c (patch) | |
| tree | 1fce04fb53d2ad5b61f5f3151e43d80e2684e579 /src/syntax | |
| parent | fef55025177ea4f248e61b68fab365bfbc0e47fb (diff) | |
Make clippy a bit happier
Diffstat (limited to 'src/syntax')
| -rw-r--r-- | src/syntax/pretty.rs | 3 |
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. |
