style: code style
This commit is contained in:
14
src/main.rs
14
src/main.rs
@@ -8,15 +8,11 @@ const B : &str = "[40m [0m";
|
|||||||
const NL : &str = "\n";
|
const NL : &str = "\n";
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
let matches = App::new("QR cli")
|
let app = App::new("QR cli").version("0.1.1")
|
||||||
.version("0.1.1")
|
.author("Hatter Jiang <jht5945@gmail.com>")
|
||||||
.author("Hatter Jiang <jht5945@gmail.com>")
|
.about("QR command line tool")
|
||||||
.about("QR command line tool")
|
.arg(Arg::with_name("INPUT").help("Set the QR input").required(true).index(1));
|
||||||
.arg(Arg::with_name("INPUT")
|
let matches = app.get_matches();
|
||||||
.help("Set the QR input")
|
|
||||||
.required(true)
|
|
||||||
.index(1))
|
|
||||||
.get_matches();
|
|
||||||
|
|
||||||
let mut input: Option<String> = None;
|
let mut input: Option<String> = None;
|
||||||
if let Some(input_arg) = matches.args.get("INPUT") {
|
if let Some(input_arg) = matches.args.get("INPUT") {
|
||||||
|
|||||||
Reference in New Issue
Block a user