Skip to content

Commit b29ebd2

Browse files
committed
Avoid explict unwrap
1 parent 500b10a commit b29ebd2

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

datafusion/expr/src/logical_plan/tree_node.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,9 @@ fn rewrite_arcs<F>(
365365
where
366366
F: FnMut(LogicalPlan) -> Result<Transformed<LogicalPlan>>,
367367
{
368-
Ok(input_plans
368+
input_plans
369369
.into_iter()
370-
.map(unwrap_arc)
371-
.map_until_stop_and_collect(&mut f)?
372-
.update_data(|inputs| {
373-
// have a Vec<LogicalPlan>, now need to wrap in `Arc`s again
374-
inputs.into_iter().map(Arc::new).collect::<Vec<_>>()
375-
}))
370+
.map_until_stop_and_collect(|plan| rewrite_arc(plan, &mut f))
376371
}
377372

378373
/// Rewrites all inputs for an Extension node "in place"

0 commit comments

Comments
 (0)