From df165a2da431138bcc5cd891aec922cbdeda6ded Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 16 Aug 2024 13:54:04 -0500 Subject: [PATCH] docs(derive): Flatten isn't just for update --- clap_builder/src/derive.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clap_builder/src/derive.rs b/clap_builder/src/derive.rs index 3c4e70b41f5..996e110a88e 100644 --- a/clap_builder/src/derive.rs +++ b/clap_builder/src/derive.rs @@ -219,6 +219,8 @@ pub trait Args: FromArgMatches + Sized { /// Append to [`Command`] so it can instantiate `Self` via /// [`FromArgMatches::from_arg_matches_mut`] /// + /// This is used to implement `#[command(flatten)]` + /// /// See also [`CommandFactory::command`]. fn augment_args(cmd: Command) -> Command; /// Append to [`Command`] so it can instantiate `self` via @@ -244,6 +246,8 @@ pub trait Subcommand: FromArgMatches + Sized { /// Append to [`Command`] so it can instantiate `Self` via /// [`FromArgMatches::from_arg_matches_mut`] /// + /// This is used to implement `#[command(flatten)]` + /// /// See also [`CommandFactory::command`]. fn augment_subcommands(cmd: Command) -> Command; /// Append to [`Command`] so it can instantiate `self` via