diff options
author | Mohamed Abdelnour <mohamed.k.abdelnour@gmail.com> | 2021-05-21 15:04:53 +0200 |
---|---|---|
committer | David Peter <sharkdp@users.noreply.github.com> | 2021-05-27 12:05:07 +0200 |
commit | 9702f5256c5f7feb6d207ddfb8d7c41676e1756d (patch) | |
tree | 4553d4145aad430eeafe1a5a2749a4048e156535 | |
parent | 23fd11e806b52dbea8c4e1d635a80ceb1f98aafa (diff) |
Use the functional update syntax
-rw-r--r-- | src/pretty_printer.rs | 9 |
1 files 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![], |