Skip to content

Commit

Permalink
More clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
viirya committed Dec 29, 2023
1 parent c18464a commit edc825e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1410,7 +1410,7 @@ impl DistributionContext {

impl TreeNode for DistributionContext {
fn children_nodes(&self) -> Vec<Self> {
self.children_nodes.iter().map(|c| c.clone()).collect()
self.children_nodes.iter().cloned().collect()
}

fn map_children<F>(mut self, transform: F) -> Result<Self>
Expand Down Expand Up @@ -1474,7 +1474,7 @@ impl PlanWithKeyRequirements {

impl TreeNode for PlanWithKeyRequirements {
fn children_nodes(&self) -> Vec<Self> {
self.children.iter().map(|c| c.clone()).collect()
self.children.iter().cloned().collect()
}

fn map_children<F>(mut self, transform: F) -> Result<Self>
Expand Down
4 changes: 2 additions & 2 deletions datafusion/core/src/physical_optimizer/enforce_sorting.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ impl PlanWithCorrespondingSort {

impl TreeNode for PlanWithCorrespondingSort {
fn children_nodes(&self) -> Vec<Self> {
self.children_nodes.iter().map(|c| c.clone()).collect()
self.children_nodes.iter().cloned().collect()
}

fn map_children<F>(mut self, transform: F) -> Result<Self>
Expand Down Expand Up @@ -227,7 +227,7 @@ impl PlanWithCorrespondingCoalescePartitions {

impl TreeNode for PlanWithCorrespondingCoalescePartitions {
fn children_nodes(&self) -> Vec<Self> {
self.children_nodes.iter().map(|c| c.clone()).collect()
self.children_nodes.iter().cloned().collect()
}

fn map_children<F>(mut self, transform: F) -> Result<Self>
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/src/physical_optimizer/pipeline_checker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl PipelineStatePropagator {

impl TreeNode for PipelineStatePropagator {
fn children_nodes(&self) -> Vec<Self> {
self.children.iter().map(|c| c.clone()).collect()
self.children.iter().cloned().collect()
}

fn map_children<F>(mut self, transform: F) -> Result<Self>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl OrderPreservationContext {

impl TreeNode for OrderPreservationContext {
fn children_nodes(&self) -> Vec<Self> {
self.children_nodes.iter().map(|c| c.clone()).collect()
self.children_nodes.iter().cloned().collect()
}

fn map_children<F>(mut self, transform: F) -> Result<Self>
Expand Down
2 changes: 1 addition & 1 deletion datafusion/core/src/physical_optimizer/sort_pushdown.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl SortPushDown {

impl TreeNode for SortPushDown {
fn children_nodes(&self) -> Vec<Self> {
self.children_nodes.iter().map(|c| c.clone()).collect()
self.children_nodes.iter().cloned().collect()
}

fn map_children<F>(mut self, transform: F) -> Result<Self>
Expand Down

0 comments on commit edc825e

Please sign in to comment.