Skip to content

Commit

Permalink
chore: rename crate to cargo-feature-analyst and provide crate as car…
Browse files Browse the repository at this point in the history
…go subcommand
  • Loading branch information
psinghal20 committed Mar 13, 2019
1 parent 2566761 commit 9df8e65
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
@@ -1,5 +1,5 @@
[package]
name = "feature_analyst"
name = "cargo-feature-analyst"
version = "0.1.0"
authors = ["psinghal20 <psinghal20@gmail.com>"]
edition = "2018"
Expand Down
12 changes: 10 additions & 2 deletions src/main.rs
Expand Up @@ -12,7 +12,15 @@ use structopt::StructOpt;


#[derive(StructOpt)]
struct Opt {
#[structopt(bin_name = "cargo")]
enum Opt {
#[structopt(name = "feature-analyst")]
/// Display feature analysis of rust crate
FeatureAnalyst(Args),
}

#[derive(StructOpt)]
struct Args {
#[structopt(long = "features", value_name = "FEATURES")]
/// Space-separated list of features to activate
features: Option<String>,
Expand All @@ -36,7 +44,7 @@ fn main() {
}
};

let args = Opt::from_args();
let Opt::FeatureAnalyst(args) = Opt::from_args();

let root = important_paths::find_root_manifest_for_wd(&config.cwd()).unwrap();
let workspace = Workspace::new(&root, &config).unwrap();
Expand Down

0 comments on commit 9df8e65

Please sign in to comment.