Skip to content

Commit

Permalink
Merge pull request #21 from joshka/jm/clap-style
Browse files Browse the repository at this point in the history
Use cargo styles for help text
  • Loading branch information
dtolnay authored Oct 31, 2024
2 parents b2fd93d + 8346530 commit 0ab8eec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ repository = "https://github.com/dtolnay/cargo-docs-rs"
anyhow = "1.0.79"
cargo-subcommand-metadata = "0.1"
clap = { version = "4", features = ["deprecated", "derive"] }
clap-cargo = "0.14.1"
serde = "1.0.194"
serde_derive = "1.0.194"
serde_json = "1.0.110"
Expand Down
6 changes: 5 additions & 1 deletion src/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ const COMPILATION_OPTIONS: &str = "Compilation Options";
const MANIFEST_OPTIONS: &str = "Manifest Options";

#[derive(Parser)]
#[command(bin_name = "cargo", version, author, disable_help_subcommand = true)]
#[command(
bin_name = "cargo",
version, author,
disable_help_subcommand = true,
styles = clap_cargo::style::CLAP_STYLING)]
pub enum Subcommand {
/// Imitate the documentation build that docs.rs would do
#[command(name = "docs-rs", version, author, disable_version_flag = true)]
Expand Down

0 comments on commit 0ab8eec

Please sign in to comment.