difftreelog
fix(cli) gc stats were always printed
in: master
1 file changed
crates/jrsonnet-cli/src/lib.rsdiffbeforeafterboth102}102}103impl GcOpts {103impl GcOpts {104 pub fn stats_printer(&self) -> (Option<GcStatsPrinter>, Option<LeakSpace>) {104 pub fn stats_printer(&self) -> (Option<GcStatsPrinter>, Option<LeakSpace>) {105 // Constructed structs have side-effects in Drop impl106 #[allow(clippy::unnecessary_lazy_evaluations)]105 (107 (106 self.gc_print_stats.then_some(GcStatsPrinter {108 self.gc_print_stats.then(|| GcStatsPrinter {107 collect_before_printing_stats: self.gc_collect_before_printing_stats,109 collect_before_printing_stats: self.gc_collect_before_printing_stats,108 }),110 }),109 (!self.gc_collect_on_exit).then_some(LeakSpace {}),111 (!self.gc_collect_on_exit).then(|| LeakSpace {}),110 )112 )111 }113 }112}114}