Skip to content

Commit

Permalink
Merge pull request #346 from Boshen/master
Browse files Browse the repository at this point in the history
doc: improve documentation of `cargo_helper`
  • Loading branch information
pacak authored Mar 15, 2024
2 parents 56faa42 + 95cb87f commit 4141714
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs2/src/cargo_helper/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ pub fn options() -> OptionParser<Options> {
let switch = short('s').help("A switch").switch();
let options = construct!(Options { argument, switch });

// Given the cargo command is `cargo pretty`.
cargo_helper("pretty", options).to_options()
}
2 changes: 1 addition & 1 deletion docs2/src/cargo_helper/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use bpaf::*;
//
#[allow(dead_code)]
#[derive(Debug, Clone, Bpaf)]
#[bpaf(options("pretty"))]
#[bpaf(options("pretty"))] // Given the cargo command is `cargo pretty`.
pub struct Options {
/// An argument
argument: usize,
Expand Down
3 changes: 2 additions & 1 deletion src/docs2/cargo_helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ pub fn options() -> OptionParser<Options> {
let switch = short('s').help("A switch").switch();
let options = construct!(Options { argument, switch });
// Given the cargo command is `cargo pretty`.
cargo_helper("pretty", options).to_options()
}
Expand All @@ -27,7 +28,7 @@ fn main() {

```no_run
#[derive(Debug, Clone, Bpaf)]
#[bpaf(options("pretty"))]
#[bpaf(options("pretty"))] // Given the cargo command is `cargo pretty`.
pub struct Options {
/// An argument
argument: usize,
Expand Down

0 comments on commit 4141714

Please sign in to comment.