Skip to content

Fixed some clippy warnings. - #716

Merged
antoyo merged 1 commit into
rust-lang:masterfrom
FractalFir:abi-cafe
Jun 20, 2025
Merged

antoyo merged 1 commit into
rust-lang:masterfrom
FractalFir:abi-cafe

Conversation

@FractalFir

Copy link
Copy Markdown
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.

@FractalFir

Copy link
Copy Markdown
Contributor Author

@antoyo should be OK to merge now.

@antoyo
antoyo merged commit 962a08f into rust-lang:master Jun 20, 2025
@antoyo

antoyo commented Jun 20, 2025

Copy link
Copy Markdown
Contributor

Thanks!
Please rebase your other PRs on the master branch since this is now merged.

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.

2 participants