Skip to content

Commit 8c83971

Browse files
committed
docs: Link to exit code info
1 parent b250c0b commit 8c83971

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

clap_builder/src/builder/command.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ impl Command {
588588
Error::raw(kind, message).format(self)
589589
}
590590

591-
/// Parse [`env::args_os`], exiting on failure.
591+
/// Parse [`env::args_os`], [exiting][Error::exit] on failure.
592592
///
593593
/// # Panics
594594
///
@@ -610,7 +610,7 @@ impl Command {
610610
self.get_matches_from(env::args_os())
611611
}
612612

613-
/// Parse [`env::args_os`], exiting on failure.
613+
/// Parse [`env::args_os`], [exiting][Error::exit] on failure.
614614
///
615615
/// Like [`Command::get_matches`] but doesn't consume the `Command`.
616616
///
@@ -670,7 +670,7 @@ impl Command {
670670
self.try_get_matches_from(env::args_os())
671671
}
672672

673-
/// Parse the specified arguments, exiting on failure.
673+
/// Parse the specified arguments, [exiting][Error::exit] on failure.
674674
///
675675
/// **NOTE:** The first argument will be parsed as the binary name unless
676676
/// [`Command::no_binary_name`] is used.

clap_builder/src/derive.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::ffi::OsString;
2222
///
2323
/// **NOTE:** Deriving requires the `derive` feature flag
2424
pub trait Parser: FromArgMatches + CommandFactory + Sized {
25-
/// Parse from `std::env::args_os()`, exit on error
25+
/// Parse from `std::env::args_os()`, [exit][Error::exit] on error.
2626
fn parse() -> Self {
2727
let mut matches = <Self as CommandFactory>::command().get_matches();
2828
let res = <Self as FromArgMatches>::from_arg_matches_mut(&mut matches)
@@ -43,7 +43,7 @@ pub trait Parser: FromArgMatches + CommandFactory + Sized {
4343
<Self as FromArgMatches>::from_arg_matches_mut(&mut matches).map_err(format_error::<Self>)
4444
}
4545

46-
/// Parse from iterator, exit on error
46+
/// Parse from iterator, [exit][Error::exit] on error.
4747
fn parse_from<I, T>(itr: I) -> Self
4848
where
4949
I: IntoIterator<Item = T>,
@@ -72,7 +72,7 @@ pub trait Parser: FromArgMatches + CommandFactory + Sized {
7272
<Self as FromArgMatches>::from_arg_matches_mut(&mut matches).map_err(format_error::<Self>)
7373
}
7474

75-
/// Update from iterator, exit on error
75+
/// Update from iterator, [exit][Error::exit] on error.
7676
fn update_from<I, T>(&mut self, itr: I)
7777
where
7878
I: IntoIterator<Item = T>,

0 commit comments

Comments
 (0)