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

Merged
merged 1 commit into from
Jun 20, 2025
Merged

Fixed some clippy warnings. #716

merged 1 commit into from
Jun 20, 2025

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.

@FractalFir
Copy link
Contributor Author

@antoyo should be OK to merge now.

@antoyo antoyo merged commit 962a08f into rust-lang:master Jun 20, 2025
38 checks passed
@antoyo
Copy link
Contributor

antoyo commented Jun 20, 2025

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy