mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
feat: Add ArgGroup::is_required_set
This is a part of #4228 I thought I needed this for another change but it turned out I didn't.
This commit is contained in:
parent
eeafb2574b
commit
8fc8b5f273
1 changed files with 6 additions and 0 deletions
|
@ -467,6 +467,12 @@ impl ArgGroup {
|
||||||
pub fn get_id(&self) -> &Id {
|
pub fn get_id(&self) -> &Id {
|
||||||
&self.id
|
&self.id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Reports whether [`ArgGroup::required`] is set
|
||||||
|
#[inline]
|
||||||
|
pub fn is_required_set(&self) -> bool {
|
||||||
|
self.required
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<&'_ ArgGroup> for ArgGroup {
|
impl From<&'_ ArgGroup> for ArgGroup {
|
||||||
|
|
Loading…
Reference in a new issue