From b382b3e5019e4d105929d96a50861e5f9e8a65e8 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 9 Jul 2024 19:29:20 +0200 Subject: [PATCH] refactor(cli): cli example was weird --- members/libpt-cli/examples/cli.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/members/libpt-cli/examples/cli.rs b/members/libpt-cli/examples/cli.rs index 345a365..7dc4509 100644 --- a/members/libpt-cli/examples/cli.rs +++ b/members/libpt-cli/examples/cli.rs @@ -23,17 +23,7 @@ struct Cli { fn main() { let cli = Cli::parse(); - let _logger = { - let mut this = { - let mut this = Logger::builder(); - let max_level = cli.verbosity.level(); - this.max_level = max_level; - this - }; - this.show_time = false; - this - } - .build(); + let _logger = Logger::builder().set_level(cli.verbosity.level()).build(); debug!("logger initialized with level: {}", cli.verbosity.level());