Skip to content

Commit

Permalink
Fix StructOpt's about
Browse files Browse the repository at this point in the history
The problem is described in these issues:
TeXitoi/structopt#333
TeXitoi/structopt#391

The is easiest workaround is to remove doc comments from `Options` and
`Subcommand`
  • Loading branch information
fimmind committed Feb 12, 2021
1 parent 2e26a80 commit 59123e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 1 addition & 3 deletions src/cli/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ lazy_static! {
pub static ref SUBCOMMAND: &'static Subcommand = &CLI.subcommand;
}

// This doc comment is for StructOpt
/// Dotfiles installation manager
#[derive(Debug, StructOpt)]
#[structopt(about = "Dotfiles installation manager")]
pub struct Cli {
#[structopt(flatten)]
options: Options,
Expand All @@ -31,7 +30,6 @@ pub struct Cli {
subcommand: Subcommand,
}

/// CLI Options
#[derive(Debug, StructOpt)]
pub struct Options {
/// Set a custom dotfiles directory
Expand Down
5 changes: 0 additions & 5 deletions src/cli/subcommand/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ use completion::Completion;
use exec::Exec;
use install::Install;

/// All the subcommand supported by the application
///
/// They should be used with structopt's [`subcommand`] attribute
///
/// [`subcommand`]: https://docs.rs/structopt/#subcommands
#[derive(Debug, StructOpt)]
pub enum Subcommand {
Install(Install),
Expand Down

0 comments on commit 59123e1

Please sign in to comment.