Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(derive): Don't emit warnings #3018

Merged
merged 1 commit into from
Nov 12, 2021
Merged

fix(derive): Don't emit warnings #3018

merged 1 commit into from
Nov 12, 2021

Conversation

epage
Copy link
Member

@epage epage commented Nov 12, 2021

Looks like this is coming from update_from_arg_matches where we do a
ladder of if __clap_arg_matches.is_present(...) that clippy wants to
be else ifs. While for human edited code, that does clarify intent,
for machine generated code that is rarely read, its a pain to do, so
silencing it.

Unfortunately, it isn't in a group we can overall silence.

Fixes #3017

Looks like this is coming from `update_from_arg_matches` where we do a
ladder of `if __clap_arg_matches.is_present(...)` that clippy wants to
be `else if`s.  While for human edited code, that does clarify intent,
for machine generated code that is rarely read, its a pain to do, so
silencing it.

Unfortunately, it isn't in a group we can overall silence.

Fixes clap-rs#3017
Copy link
Member

@pksunkara pksunkara left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 12, 2021

Build succeeded:

@bors bors bot merged commit 4b70a6e into clap-rs:master Nov 12, 2021
@epage epage deleted the clippy branch November 15, 2021 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested subcommands in enums gives lots of clippy warnings
2 participants