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 stable clippy::needless_collect #1238

Merged
merged 3 commits into from
Oct 18, 2021
Merged

fix stable clippy::needless_collect #1238

merged 3 commits into from
Oct 18, 2021

Conversation

q9f
Copy link
Contributor

@q9f q9f commented Sep 30, 2021

This fixes Clippy warnings for the latest Rust stable (1.55), where functions collect an iterator when collect() is unnecessary.

See: https://rust-lang.github.io/rust-clippy/master/index.html#needless_collect

After #1228 is merged.

However, this specific fix might not be optimal, and we should just consider to ignore Clippy here. Ref rust-lang/rust-clippy#6164 and rust-lang/rust-clippy#6909; especially in this instance, as we are collecting the iterator straight into a loop.

@q9f q9f marked this pull request as ready for review October 18, 2021 14:31
@q9f q9f requested a review from a user October 18, 2021 14:31
@q9f q9f merged commit a56e4a5 into main Oct 18, 2021
@q9f q9f deleted the q9f/clippy/needlesscollect branch October 18, 2021 15:42
@q9f q9f mentioned this pull request Jan 12, 2022
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.

None yet

2 participants