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

chore: Apply Clippy lint collection_is_never_used #5654

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

Conversation

jbencin
Copy link
Contributor

@jbencin jbencin commented Jan 4, 2025

Description

Apply Clippy lint collection_is_never_used. This found a lot of collections, mostly in test code, that were created but never read. These fell into a few different categories:

  • Something which looked like it was intended to be used, but was not. These are possible bugs and should be reviewed by someone familiar with the code!
  • Storing the result of calling a function with a side effect. I left these alone and marked them with #[allow(clippy::collection_is_never_read)]
  • Obvious leftovers from copy/pasted blocks of code, particularly in tests

Note that collection_is_never_used is a "Nursery" lint, meaning it's not considered stable/accurate. It's not in the default set of lints Clippy runs, but still useful for finding unused code

@jbencin jbencin requested a review from a team as a code owner January 4, 2025 05:04
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