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:
Ed Page 2022-09-29 16:04:24 -05:00
parent eeafb2574b
commit 8fc8b5f273

View file

@ -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 {