Skip to content

Commit

Permalink
Merge pull request #60 from dtolnay/p
Browse files Browse the repository at this point in the history
Implement -p argument to expand particular package
  • Loading branch information
dtolnay authored Apr 20, 2019
2 parents 8512a19 + e9bfa14 commit 3ae4ca1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ fn apply_args(cmd: &mut Command, args: &Args, outfile: &Path) {
line.arg(manifest_path);
}

if let Some(package) = &args.package {
line.arg("--package");
line.arg(package);
}

if let Some(jobs) = args.jobs {
line.arg("--jobs");
line.arg(jobs.to_string());
Expand Down
4 changes: 4 additions & 0 deletions src/opts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ pub struct Args {
#[structopt(long, value_name = "PATH", parse(from_os_str))]
pub manifest_path: Option<PathBuf>,

/// Package to expand
#[structopt(short, long, value_name = "SPEC")]
pub package: Option<String>,

/// Number of parallel jobs, defaults to # of CPUs
#[structopt(short, long, value_name = "N")]
pub jobs: Option<u64>,
Expand Down

0 comments on commit 3ae4ca1

Please sign in to comment.