From 3a62a6f34aef726c76e55f318584abcd82d1fa07 Mon Sep 17 00:00:00 2001 From: Ashley Williams Date: Fri, 13 Apr 2018 08:17:16 -0400 Subject: [PATCH] fix(command): don't need command in function name --- src/command.rs | 6 +++--- src/main.rs | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/command.rs b/src/command.rs index 0462520..bd1f991 100644 --- a/src/command.rs +++ b/src/command.rs @@ -46,7 +46,7 @@ pub fn create_pkg_dir(path: &str) -> result::Result<(), Error> { Ok(()) } -pub fn init_command(path: Option, scope: Option) -> result::Result<(), Error> { +pub fn init(path: Option, scope: Option) -> result::Result<(), Error> { let started = Instant::now(); let crate_path = set_crate_path(path); @@ -73,7 +73,7 @@ pub fn init_command(path: Option, scope: Option) -> result::Resu Ok(()) } -pub fn pack_command(path: Option) -> result::Result<(), Error> { +pub fn pack(path: Option) -> result::Result<(), Error> { let crate_path = set_crate_path(path); npm::npm_pack(&crate_path); @@ -81,7 +81,7 @@ pub fn pack_command(path: Option) -> result::Result<(), Error> { Ok(()) } -pub fn publish_command(path: Option) -> result::Result<(), Error> { +pub fn publish(path: Option) -> result::Result<(), Error> { let crate_path = set_crate_path(path); npm::npm_publish(&crate_path); diff --git a/src/main.rs b/src/main.rs index afc7355..4847aba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,16 +6,16 @@ extern crate quicli; use quicli::prelude::*; use wasm_pack::Cli; -use wasm_pack::command::{init_command, pack_command, publish_command, Command}; +use wasm_pack::command::{init, pack, publish, Command}; main!(|args: Cli, log_level: verbosity| match args.cmd { Command::Init { path, scope } => { - init_command(path, scope)?; + init(path, scope)?; } Command::Pack { path } => { - pack_command(path)?; + pack(path)?; } Command::Publish { path } => { - publish_command(path)?; + publish(path)?; } });