From 7ca535d3f69d8d799645eebab81ef02159393efb Mon Sep 17 00:00:00 2001 From: Chris Hopman Date: Wed, 22 Jun 2022 13:18:46 -0700 Subject: [PATCH] Remove workarounds for https://github.com/TeXitoi/structopt/issues/333 Summary: This workaround seems to be unnecessary since we migrated to newer clap. Reviewed By: stepancheg Differential Revision: D37334350 fbshipit-source-id: 3b5c116ec492ea8e6be2fe61cbdd975a115573ba --- cli/src/commands/common.rs | 40 ++++---------------------------------- cli/src/commands/uquery.rs | 10 +--------- 2 files changed, 5 insertions(+), 45 deletions(-) diff --git a/cli/src/commands/common.rs b/cli/src/commands/common.rs index 1ccf298ce07d..0a25e421b223 100644 --- a/cli/src/commands/common.rs +++ b/cli/src/commands/common.rs @@ -93,15 +93,7 @@ pub(crate) enum HostPlatformOverride { Windows, } -// Workaround to have rustdoc that doesn't override cli help docs. -// See https://github.com/TeXitoi/structopt/issues/333 -#[cfg_attr(not(doc), allow(missing_docs))] -#[cfg_attr( - doc, - doc = r#" -Defines options related to event logs. Any command that involves a streaming daemon command should include these options. -"# -)] +/// Defines options related to event logs. Any command that involves a streaming daemon command should include these options. #[derive(Debug, clap::Parser, serde::Serialize, serde::Deserialize)] pub(crate) struct CommonEventLogOptions { /// Write events to this log file @@ -123,15 +115,7 @@ impl CommonEventLogOptions { } } -// Workaround to have rustdoc that doesn't override cli help docs. -// See https://github.com/TeXitoi/structopt/issues/333 -#[cfg_attr(not(doc), allow(missing_docs))] -#[cfg_attr( - doc, - doc = r#" -Defines options for config and configuration related things. Any command that involves the build graph should include these options. -"# -)] +/// Defines options for config and configuration related things. Any command that involves the build graph should include these options. #[derive(Debug, clap::Parser, serde::Serialize, serde::Deserialize)] pub(crate) struct CommonConfigOptions { #[clap( @@ -258,15 +242,7 @@ impl CommonConfigOptions { } } -// Workaround to have rustdoc that doesn't override cli help docs. -// See https://github.com/TeXitoi/structopt/issues/333 -#[cfg_attr(not(doc), allow(missing_docs))] -#[cfg_attr( - doc, - doc = r#" -Defines common options for build-like commands (build, test, install). -"# -)] +/// Defines common options for build-like commands (build, test, install). #[derive(Debug, clap::Parser, serde::Serialize, serde::Deserialize)] pub(crate) struct CommonBuildOptions { /// Print a build report @@ -361,15 +337,7 @@ impl CommonBuildOptions { } } -// Workaround to have rustdoc that doesn't override cli help docs. -// See https://github.com/TeXitoi/structopt/issues/333 -#[cfg_attr(not(doc), allow(missing_docs))] -#[cfg_attr( - doc, - doc = r#" -Defines common console options for commands. -"# -)] +/// Defines common console options for commands. #[derive(Debug, clap::Parser, serde::Serialize, serde::Deserialize)] pub(crate) struct CommonConsoleOptions { #[clap( diff --git a/cli/src/commands/uquery.rs b/cli/src/commands/uquery.rs index ba6a19837c88..07be53bf034a 100644 --- a/cli/src/commands/uquery.rs +++ b/cli/src/commands/uquery.rs @@ -28,15 +28,7 @@ enum QueryOutputFormatArg { Json, } -/// Perform the target graph query -// Workaround for https://github.com/TeXitoi/structopt/issues/333 -#[cfg_attr(not(doc), allow(missing_docs))] -#[cfg_attr( - doc, - doc = r#" -Perform the target graph query -"# -)] +/// Args common to all the query commands #[derive(Debug, clap::Parser)] pub(crate) struct CommonQueryArgs { #[clap(name = "QUERY", help = "the query to evaluate")]