From 8c83971b8c356b8c9abfbbb2320cb946a2ee8139 Mon Sep 17 00:00:00 2001 From: Martin Pool Date: Mon, 15 Jan 2024 14:27:50 -0800 Subject: [PATCH] docs: Link to exit code info --- clap_builder/src/builder/command.rs | 6 +++--- clap_builder/src/derive.rs | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/clap_builder/src/builder/command.rs b/clap_builder/src/builder/command.rs index 6e56b183411..3666d1955f8 100644 --- a/clap_builder/src/builder/command.rs +++ b/clap_builder/src/builder/command.rs @@ -588,7 +588,7 @@ impl Command { Error::raw(kind, message).format(self) } - /// Parse [`env::args_os`], exiting on failure. + /// Parse [`env::args_os`], [exiting][Error::exit] on failure. /// /// # Panics /// @@ -610,7 +610,7 @@ impl Command { self.get_matches_from(env::args_os()) } - /// Parse [`env::args_os`], exiting on failure. + /// Parse [`env::args_os`], [exiting][Error::exit] on failure. /// /// Like [`Command::get_matches`] but doesn't consume the `Command`. /// @@ -670,7 +670,7 @@ impl Command { self.try_get_matches_from(env::args_os()) } - /// Parse the specified arguments, exiting on failure. + /// Parse the specified arguments, [exiting][Error::exit] on failure. /// /// **NOTE:** The first argument will be parsed as the binary name unless /// [`Command::no_binary_name`] is used. diff --git a/clap_builder/src/derive.rs b/clap_builder/src/derive.rs index 7494e8461dc..d4dba8fd54a 100644 --- a/clap_builder/src/derive.rs +++ b/clap_builder/src/derive.rs @@ -22,7 +22,7 @@ use std::ffi::OsString; /// /// **NOTE:** Deriving requires the `derive` feature flag pub trait Parser: FromArgMatches + CommandFactory + Sized { - /// Parse from `std::env::args_os()`, exit on error + /// Parse from `std::env::args_os()`, [exit][Error::exit] on error. fn parse() -> Self { let mut matches = ::command().get_matches(); let res = ::from_arg_matches_mut(&mut matches) @@ -43,7 +43,7 @@ pub trait Parser: FromArgMatches + CommandFactory + Sized { ::from_arg_matches_mut(&mut matches).map_err(format_error::) } - /// Parse from iterator, exit on error + /// Parse from iterator, [exit][Error::exit] on error. fn parse_from(itr: I) -> Self where I: IntoIterator, @@ -72,7 +72,7 @@ pub trait Parser: FromArgMatches + CommandFactory + Sized { ::from_arg_matches_mut(&mut matches).map_err(format_error::) } - /// Update from iterator, exit on error + /// Update from iterator, [exit][Error::exit] on error. fn update_from(&mut self, itr: I) where I: IntoIterator,