From 104aadd4b2d450f2a14ab45ae5c59de0ef1e3894 Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 2 Aug 2020 23:14:13 +0800 Subject: [PATCH] style: code style --- src/main.rs | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7f9a0f3..ad132c5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,15 +8,11 @@ const B : &str = " "; const NL : &str = "\n"; fn main() -> Result<(), Box> { - let matches = App::new("QR cli") - .version("0.1.1") - .author("Hatter Jiang ") - .about("QR command line tool") - .arg(Arg::with_name("INPUT") - .help("Set the QR input") - .required(true) - .index(1)) - .get_matches(); + let app = App::new("QR cli").version("0.1.1") + .author("Hatter Jiang ") + .about("QR command line tool") + .arg(Arg::with_name("INPUT").help("Set the QR input").required(true).index(1)); + let matches = app.get_matches(); let mut input: Option = None; if let Some(input_arg) = matches.args.get("INPUT") {