Skip to content

is_multiple shouldn't require &mut self #4708

Description

@klnusbaum

Please complete the following tasks

Clap Version

4.1.4

Describe your use case

ArgGroup::is_multiple requires a &mut self, yet the function does not itself do any mutations to the ArgGroup. The &mut is unnecessary. It also means that when you have an immutable reference to an ArgGroup (like the one you would get from calling groups() on a command), you can't check it the group allows multiple options.

Describe the solution you'd like

We should remove the &mut from the function signature.

Alternatives, if applicable

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-builderArea: Builder APIC-bugCategory: bugE-easyCall for participation: Experience needed to fix: Easy / not muchM-breaking-changeMeta: Implementing or merging this will introduce a breaking change.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions