From 8b4941846fe0fd9b3f5db1a773b5808cece31c8d Mon Sep 17 00:00:00 2001 From: syn Date: Mon, 13 Jan 2020 23:05:34 +0300 Subject: Some refactoring --- src/main.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index af6a547..0e97682 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use clap::{AppSettings}; +use clap::AppSettings; use structopt::StructOpt; use env_logger; use log::{ trace, error }; @@ -53,15 +53,15 @@ fn main() { trace!("{:#?}", config); - let (action, result) = - if src_path.exists() { - ("run", config.run(&src_path)) - } else { - ("make", config.make(&src_path)) - }; + let result = + if src_path.exists() { + config.run(&src_path) + } else { + config.make(&src_path) + }; match result { - Ok(_) => trace!("ok {}", action), + Ok(_) => trace!("ok"), Err(err) => error!("{}", err) } } -- cgit v1.2.1-18-gbd029