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

Many clippy errors in Rust 1.72 #7398

Closed
alamb opened this issue Aug 24, 2023 · 1 comment · Fixed by #7399
Closed

Many clippy errors in Rust 1.72 #7398

alamb opened this issue Aug 24, 2023 · 1 comment · Fixed by #7399
Assignees
Labels
bug Something isn't working

Comments

@alamb
Copy link
Contributor

alamb commented Aug 24, 2023

Describe the bug

Rust 1.72 was just released and Clippy has gotten pickier: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1720-2023-08-24

To Reproduce

update rust

Run

cargo clippy --all-targets --workspace --features avro,pyarrow -- -D warnings

You'll see errors like this:

https://github.com/alamb/arrow-datafusion/actions/runs/5965191830/job/16182337693
https://github.com/apache/arrow-datafusion/actions/runs/5964521711/job/16180238082

...
error: usage of `Iterator::fold` on a type that implements `Try`
  --> datafusion/expr/src/type_coercion/other.rs:31:10
   |
31 |           .fold(Some(expr_type.clone()), |left, right_type| match left {
   |  __________^
32 | |             None => None,
33 | |             Some(left_type) => comparison_coercion(&left_type, right_type),
34 | |         })
   | |__________^ help: use `try_fold` instead: `try_fold(expr_type.clone(), |left, right_type| ...)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
   = note: `-D clippy::manual-try-fold` implied by `-D warnings`
...

Expected behavior

Clean run

Additional context

No response

@alamb alamb added the bug Something isn't working label Aug 24, 2023
@alamb alamb self-assigned this Aug 24, 2023
@alamb
Copy link
Contributor Author

alamb commented Aug 24, 2023

I am working on a fix for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant