on master help sign in
Use the functional update syntax
commit9702f5256c5f7feb6d207ddfb8d7c41676e1756d authorMohamed Abdelnour <mohamed.k.abdelnour@gmail.com> dateFri 21 May 2021, 15:04 (5 years ago) parent23fd11e
1 file changed+5−4
src/pretty_printer.rs+5−4
src/pretty_printer.rs+5−4
@@ -40,10 +40,11 @@ pub struct PrettyPrinter<'a> {
4040
4141impl<'a> PrettyPrinter<'a> {
4242 pub fn new() -> Self {
43− let mut config = Config::default();
44−
45− config.colored_output = true;
46− config.true_color = true;
43+ let config = Config {
44+ colored_output: true,
45+ true_color: true,
46+ ..Default::default()
47+ };
4748
4849 PrettyPrinter {
4950 inputs: vec![],