From 6e1951bdad09b4a7c8445bca615c192513415cc2 Mon Sep 17 00:00:00 2001 From: Max Winter Date: Thu, 7 Dec 2023 17:47:06 +0100 Subject: [PATCH] refactoring Signed-off-by: Max Winter --- src/main.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index a65adbf..5d6c07f 100644 --- a/src/main.rs +++ b/src/main.rs @@ -28,16 +28,13 @@ pub struct Cli { fn main() { - let commands = Cli::parse().commands; - let verbose = Cli::parse().verbose; + let Cli { commands, verbose } = Cli::parse(); env_logger::builder().filter_level(verbose.log_level_filter()).init(); match commands { - Commands::Import(mut import) => { - import.import() - } - Commands::Clean(mut clean) => { clean.clean() } + Commands::Import(mut import) => import.import(), + Commands::Clean(mut clean) => clean.clean(), } }