diff --git a/src/command.rs b/src/command.rs index f09bc33..0462520 100644 --- a/src/command.rs +++ b/src/command.rs @@ -1,3 +1,4 @@ +use PBAR; use bindgen; use build; use console::style; @@ -6,9 +7,8 @@ use failure::Error; use indicatif::HumanDuration; use manifest; use npm; -use readme; -use PBAR; use quicli::prelude::*; +use readme; use std::fs; use std::result; use std::time::Instant; @@ -60,20 +60,20 @@ pub fn init_command(path: Option, scope: Option) -> result::Resu let name = manifest::get_crate_name(&crate_path)?; bindgen::wasm_bindgen_build(&crate_path, &name); PBAR.one_off_message(&format!( - "{} Done in {}", - emoji::SPARKLE, - HumanDuration(started.elapsed()) + "{} Done in {}", + emoji::SPARKLE, + HumanDuration(started.elapsed()) )); PBAR.one_off_message(&format!( - "{} Your WASM pkg is ready to publish at {}/pkg", - emoji::PACKAGE, - &crate_path + "{} Your WASM pkg is ready to publish at {}/pkg", + emoji::PACKAGE, + &crate_path )); PBAR.done()?; Ok(()) } -pub fn pack_command(path: Option) -> result::Result<(),Error> { +pub fn pack_command(path: Option) -> result::Result<(), Error> { let crate_path = set_crate_path(path); npm::npm_pack(&crate_path); @@ -96,5 +96,4 @@ fn set_crate_path(path: Option) -> String { }; crate_path - } diff --git a/src/lib.rs b/src/lib.rs index 4827f3f..46009a9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,4 +34,3 @@ pub struct Cli { #[structopt(long = "verbose", short = "v", parse(from_occurrences))] pub verbosity: u8, } - diff --git a/src/main.rs b/src/main.rs index 17610fc..0c26474 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,7 @@ extern crate quicli; use quicli::prelude::*; use wasm_pack::Cli; -use wasm_pack::command::{Command, init_command, pack_command, publish_command}; +use wasm_pack::command::{init_command, pack_command, publish_command, Command}; main!(|args: Cli, log_level: verbosity| match args.cmd {