Describe the bug
Seems like there are a few places in the codebase where clippy now starts to be noticing problems, and it is making lint checks fail across all new PRs (and the master)
The new lint errors looks reasonable to me, so we should be able to fix all three by removing the closures.
error: unnecessary closure used with `bool::then`
--> datafusion/core/src/physical_plan/file_format/delimited_stream.rs:71:17
|
71 | (*v == NEWLINE).then(|| idx + 1)
| ^^^^^^^^^^^^^^^^----------------
| |
| help: use `then_some(..)` instead: `then_some(idx + 1)`
|
= note: `-D clippy::unnecessary-lazy-evaluations` implied by `-D warnings`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
error: unnecessary closure used with `bool::then`
--> datafusion/core/src/physical_plan/hash_join.rs:1243:33
|
1243 | .filter_map(|v| (!visited_left_side.get_bit(v)).then(|| v as u64)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------
| |
| help: use `then_some(..)` instead: `then_some(v as u64)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
error: unnecessary closure used with `bool::then`
--> datafusion/core/src/physical_plan/hash_join.rs:1248:33
|
1248 | .filter_map(|v| (visited_left_side.get_bit(v)).then(|| v as u64)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------
| |
| help: use `then_some(..)` instead: `then_some(v as u64)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations
Describe the bug
Seems like there are a few places in the codebase where clippy now starts to be noticing problems, and it is making lint checks fail across all new PRs (and the master)
The new lint errors looks reasonable to me, so we should be able to fix all three by removing the closures.