edits to appease cargo fmt

master
andy-bell 7 years ago
parent 07d9001b59
commit 542dd3312f
No known key found for this signature in database
GPG Key ID: 023F2AD4105EB83E
  1. 19
      src/command.rs
  2. 1
      src/lib.rs
  3. 2
      src/main.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<String>, scope: Option<String>) -> 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<String>) -> result::Result<(),Error> {
pub fn pack_command(path: Option<String>) -> 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>) -> String {
};
crate_path
}

@ -34,4 +34,3 @@ pub struct Cli {
#[structopt(long = "verbose", short = "v", parse(from_occurrences))]
pub verbosity: u8,
}

@ -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 {

Loading…
Cancel
Save