alamb opened a new pull request, #10743: URL: https://github.com/apache/arrow-rs/pull/10743
# Which issue does this PR close? N/A -- fixes CI on main # Rationale for this change CI clippy jobs on main are failing, e.g. https://github.com/apache/arrow-rs/actions/runs/32180217000/job/95851222817 This is not due to any recent code change: CI uses the latest stable Rust, and the new Rust 1.97 release promoted the [`clippy::return_and_then`](https://rust-lang.github.io/rust-clippy/rust-1.97.0/index.html#return_and_then) lint, which now fires on one closure in `parquet/src/arrow/arrow_reader/statistics.rs`: ```text error: use the `?` operator instead of an `and_then` call --> parquet/src/arrow/arrow_reader/statistics.rs:1841:22 | 1841 | .map(|s| s.and_then(|s| s.distinct_count_opt())); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` # What changes are included in this PR? Rewrite the closure to use the `?` operator as clippy suggests (semantically identical, no behavior change): ```rust .map(|s| s?.distinct_count_opt()); ``` I verified locally with clippy 1.97 that this is the only new lint error across the entire workspace (`cargo clippy --workspace --all-targets --all-features -- -D warnings` now passes). -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
