From a3a476407b01f083dc06200783ad745bc45e5da8 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Fri, 16 Aug 2024 14:08:26 -0500 Subject: [PATCH] docs(derive): Specify Parser::update_from semantics --- 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 996e110a88e..28d56abde41 100644 --- a/clap_builder/src/derive.rs +++ b/clap_builder/src/derive.rs @@ -73,6 +73,10 @@ pub trait Parser: FromArgMatches + CommandFactory + Sized { } /// Update from iterator, [exit][Error::exit] on error. + /// + /// Unlike [`Parser::parse`], this works with an existing instance of `self`. + /// The assumption is that all required fields are already provided and any [`Args`] or + /// [`Subcommand`]s provided by the user will modify only what is specified. fn update_from(&mut self, itr: I) where I: IntoIterator,