Add a Default implementation for PrettyPrinter
commit09fbabb0b8b278d098765684cdfbfcd928bf209a
authorsharkdp <davidpeter@web.de>
dateSat 9 Jan 2021, 15:27 (6 years ago)
parentde6cb75
src/pretty_printer.rs+6
@@ -320,6 +320,12 @@ impl<'a> PrettyPrinter<'a> {
320320 }
321321}
322322
323+impl Default for PrettyPrinter<'_> {
324+ fn default() -> Self {
325+ Self::new()
326+ }
327+}
328+
323329/// An input source for the pretty printer.
324330pub struct Input<'a> {
325331 input: input::Input<'a>,