From 9702f5256c5f7feb6d207ddfb8d7c41676e1756d Mon Sep 17 00:00:00 2001 From: Mohamed Abdelnour Date: Fri, 21 May 2021 15:04:53 +0200 Subject: [PATCH] Use the functional update syntax --- src/pretty_printer.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pretty_printer.rs b/src/pretty_printer.rs index 7f1c2b7f..1d81dc81 100644 --- a/src/pretty_printer.rs +++ b/src/pretty_printer.rs @@ -40,10 +40,11 @@ pub struct PrettyPrinter<'a> { impl<'a> PrettyPrinter<'a> { pub fn new() -> Self { - let mut config = Config::default(); - - config.colored_output = true; - config.true_color = true; + let config = Config { + colored_output: true, + true_color: true, + ..Default::default() + }; PrettyPrinter { inputs: vec![],