From d052fb2b34fc34af22fd7165f8627aab15b48cdf Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 9 Jul 2024 19:51:22 +0200 Subject: [PATCH] docs(cli): example was broken --- members/libpt-cli/examples/repl.rs | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/members/libpt-cli/examples/repl.rs b/members/libpt-cli/examples/repl.rs index dc8c357..2d07794 100644 --- a/members/libpt-cli/examples/repl.rs +++ b/members/libpt-cli/examples/repl.rs @@ -31,17 +31,7 @@ enum ReplCommand { fn main() -> anyhow::Result<()> { // You would normally make a proper cli interface with clap before entering the repl. This is // omitted here for brevity - let _logger = { - let mut this = { - let mut this = Logger::builder(); - this.show_time = false; - this - }; - let max_level = Level::INFO; - this.max_level = max_level; - this - } - .build()?; + let _logger = Logger::builder().display_time(false).build(); // the compiler can infer that we want to use the ReplCommand enum. let mut repl = DefaultRepl::::default();