Skip to content

Commit

Permalink
fix(builder): don't require mut for is_multiple
Browse files Browse the repository at this point in the history
  • Loading branch information
klnusbaum committed Feb 13, 2023
1 parent ad5d676 commit 5e89094
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/builder/arg_group.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ impl ArgGroup {
///
/// assert!(group.is_multiple());
/// ```
pub fn is_multiple(&mut self) -> bool {
pub fn is_multiple(&self) -> bool {
self.multiple
}

Expand Down Expand Up @@ -577,10 +577,10 @@ mod test {
fn arg_group_expose_is_multiple_helper() {
let args: Vec<Id> = vec!["a1".into(), "a4".into()];

let mut grp_multiple = ArgGroup::new("test_multiple").args(&args).multiple(true);
let grp_multiple = ArgGroup::new("test_multiple").args(&args).multiple(true);
assert!(grp_multiple.is_multiple());

let mut grp_not_multiple = ArgGroup::new("test_multiple").args(&args).multiple(false);
let grp_not_multiple = ArgGroup::new("test_multiple").args(&args).multiple(false);
assert!(!grp_not_multiple.is_multiple());
}

Expand Down

0 comments on commit 5e89094

Please sign in to comment.