summaryrefslogtreecommitdiffstats
path: root/vendor/clap/src/builder/arg.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:06:31 +0000
commit2ff14448863ac1a1dd9533461708e29aae170c2d (patch)
tree85b9fea2bbfe3f06473cfa381eed11f273b57c5c /vendor/clap/src/builder/arg.rs
parentAdding debian version 1.64.0+dfsg1-1. (diff)
downloadrustc-2ff14448863ac1a1dd9533461708e29aae170c2d.tar.xz
rustc-2ff14448863ac1a1dd9533461708e29aae170c2d.zip
Adding debian version 1.65.0+dfsg1-2.debian/1.65.0+dfsg1-2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--vendor/clap/src/builder/arg.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/clap/src/builder/arg.rs b/vendor/clap/src/builder/arg.rs
index 63e88e80e..e9403d0b7 100644
--- a/vendor/clap/src/builder/arg.rs
+++ b/vendor/clap/src/builder/arg.rs
@@ -4316,6 +4316,16 @@ impl<'help> Arg<'help> {
}
}
+ /// Get *all* short aliases for this argument, if any, both visible and hidden.
+ #[inline]
+ pub fn get_all_short_aliases(&self) -> Option<Vec<char>> {
+ if self.short_aliases.is_empty() {
+ None
+ } else {
+ Some(self.short_aliases.iter().map(|(s, _)| s).copied().collect())
+ }
+ }
+
/// Get the short option name and its visible aliases, if any
#[inline]
pub fn get_short_and_visible_aliases(&self) -> Option<Vec<char>> {
@@ -4351,6 +4361,16 @@ impl<'help> Arg<'help> {
}
}
+ /// Get *all* aliases for this argument, if any, both visible and hidden.
+ #[inline]
+ pub fn get_all_aliases(&self) -> Option<Vec<&'help str>> {
+ if self.aliases.is_empty() {
+ None
+ } else {
+ Some(self.aliases.iter().map(|(s, _)| s).copied().collect())
+ }
+ }
+
/// Get the long option name and its visible aliases, if any
#[inline]
pub fn get_long_and_visible_aliases(&self) -> Option<Vec<&'help str>> {