Skip to content

Fixed some clippy warnings. #716

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FractalFir
Copy link
Contributor

Slienced some bogus clippy warnings in abi_tests.

This file is meant to be expanded in the future(by adding options needed for CI runs), and clippy is complaing about some of that scafolding code.

The warning clippy::never_loop is raised because the command only supports one argument(--help) which stops argument parsing, and prints a message. So, the loop can only iterate once: by either printing the help, or an error message(for invalid options). This is correct, and the loop is still needed to handle new parameters we will add in the future.

clippy::while_let_on_iterator, on the other hand, warns us that this while loop could be rewritten as a for loop. This is true now, because we don't have any parameters with additional arguments. If we want to add a parameter like this:
--abi-cafe-config <path>, we will need to get the path by calling next. This is not possible when using a for loop.

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.

1 participant