From 09fbabb0b8b278d098765684cdfbfcd928bf209a Mon Sep 17 00:00:00 2001 From: sharkdp Date: Sat, 9 Jan 2021 15:27:28 +0100 Subject: [PATCH] Add a Default implementation for PrettyPrinter --- src/pretty_printer.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/pretty_printer.rs b/src/pretty_printer.rs index cdf22df9..272e073b 100644 --- a/src/pretty_printer.rs +++ b/src/pretty_printer.rs @@ -320,6 +320,12 @@ impl<'a> PrettyPrinter<'a> { } } +impl Default for PrettyPrinter<'_> { + fn default() -> Self { + Self::new() + } +} + /// An input source for the pretty printer. pub struct Input<'a> { input: input::Input<'a>,