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

ARROW-11137: [Rust][DataFusion] Clippy needless_range_loop,needless_lifetimes #9106

Closed
wants to merge 1 commit into from

Conversation

Dandandan
Copy link
Contributor

Fixes:

  • clippy::needless_lifetimes,
  • clippy::needless_range_loop

@github-actions
Copy link

github-actions bot commented Jan 5, 2021

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Dandandan

@@ -138,8 +138,8 @@ impl ExecutionPlan for RepartitionExec {
}

// notify each output partition that this input partition has no more data
for i in 0..num_output_partitions {
let tx = &mut channels[i].0;
for channel in channels.iter_mut().take(num_output_partitions) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can probably be even simpler as I think channels always has num_output_partitions elemements:

Suggested change
for channel in channels.iter_mut().take(num_output_partitions) {
for channel in channels.iter_mut() {

But this PR's code is a correct as what was previously here :)

@alamb alamb closed this in fdf5e88 Jan 5, 2021
GeorgeAp pushed a commit to sirensolutions/arrow that referenced this pull request Jun 7, 2021
…ifetimes

Fixes:
* clippy::needless_lifetimes,
 * clippy::needless_range_loop

Closes apache#9106 from Dandandan/clippy_5

Authored-by: Heres, Daniel <danielheres@gmail.com>
Signed-off-by: Andrew Lamb <andrew@nerdnetworks.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants