From cfe393342221749ac95aa7ad2b3b0c80c9b7e0fc Mon Sep 17 00:00:00 2001 From: Hatter Jiang Date: Sun, 2 Aug 2020 23:28:25 +0800 Subject: [PATCH] style: code style --- src/cmd.rs | 2 +- src/cmd_default.rs | 2 +- src/cmd_newcliapp.rs | 16 ++++++++-------- src/cmd_sample.rs | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/cmd.rs b/src/cmd.rs index 6ecaf42..26f493f 100644 --- a/src/cmd.rs +++ b/src/cmd.rs @@ -1,4 +1,4 @@ -use clap::{ ArgMatches, App, }; +use clap::{ ArgMatches, App }; pub type CommandError = Result<(), Box>; diff --git a/src/cmd_default.rs b/src/cmd_default.rs index abf98a7..11ddf4e 100644 --- a/src/cmd_default.rs +++ b/src/cmd_default.rs @@ -1,4 +1,4 @@ -use clap::{ App, Arg, ArgMatches, }; +use clap::{ App, Arg, ArgMatches }; use crate::cmd::CommandError; pub struct CommandDefault; diff --git a/src/cmd_newcliapp.rs b/src/cmd_newcliapp.rs index b0abeed..7a2fedf 100644 --- a/src/cmd_newcliapp.rs +++ b/src/cmd_newcliapp.rs @@ -1,14 +1,14 @@ -use std::fs::{ self, File, }; -use clap::{ Arg, ArgMatches, SubCommand, App, }; -use crate::cmd::{ Command, CommandError, }; +use std::fs::{ self, File }; +use clap::{ Arg, ArgMatches, SubCommand, App }; +use crate::cmd::{ Command, CommandError }; const CARGO_TOML_FILE: &str = "Cargo.toml"; -const MAIN_RS: &str = include_str!("main.rs_template"); -const CMD_RS: &str = include_str!("cmd.rs"); -const CMD_DEFAULT_RS: &str = include_str!("cmd_default.rs"); -const CMD_SAMPLE_RS: &str = include_str!("cmd_sample.rs"); -const CARGO_TOML: &str = include_str!("Carto.toml_template"); +const MAIN_RS: &str = include_str!("main.rs_template"); +const CMD_RS: &str = include_str!("cmd.rs"); +const CMD_DEFAULT_RS: &str = include_str!("cmd_default.rs"); +const CMD_SAMPLE_RS: &str = include_str!("cmd_sample.rs"); +const CARGO_TOML: &str = include_str!("Carto.toml_template"); pub struct CommandNewCliApp; diff --git a/src/cmd_sample.rs b/src/cmd_sample.rs index 5d8e812..7c4561c 100644 --- a/src/cmd_sample.rs +++ b/src/cmd_sample.rs @@ -1,5 +1,5 @@ -use clap::{ ArgMatches, SubCommand, App, }; -use crate::cmd::{ Command, CommandError, }; +use clap::{ ArgMatches, SubCommand, App }; +use crate::cmd::{ Command, CommandError }; pub struct CommandSample;