Skip to content

More workspace lints: finish [workspace.lints.rust] - #10551

Merged
Jefffrey merged 8 commits into
apache:mainfrom
emilk:emilk/more-lints
Aug 5, 2026
Merged

More workspace lints: finish [workspace.lints.rust]#10551
Jefffrey merged 8 commits into
apache:mainfrom
emilk:emilk/more-lints

Conversation

@emilk

@emilk emilk commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

No issue in particular

Rationale for this change

#10533 added [workspace.lints] with a minimal set of lints.

This fills out [workspace.lints.rust] with more lints.

What changes are included in this PR?

Best reviewed commit by commit!

Are these changes tested?

By CI

Are there any user-facing changes?

No public API changed.

@github-actions github-actions Bot added parquet Changes to the parquet crate arrow Changes to the arrow crate parquet-derive parquet_derive crate parquet-variant parquet-variant* crates arrow-avro arrow-avro crate arrow-string arrow-ipc arrow-cast arrow-array labels Aug 4, 2026
@emilk
emilk marked this pull request as ready for review August 4, 2026 19:10
Comment thread parquet/src/arrow/array_reader/primitive_array.rs Outdated
Comment thread parquet/src/util/bit_util.rs Outdated
@Jefffrey Jefffrey added the development-process Related to development process of arrow-rs label Aug 4, 2026
emilk added 8 commits August 5, 2026 08:32
Removes casts where the source and target types are identical, e.g.
`u64 as u64`. Two macro bodies keep the cast (it is only trivial for
some of their instantiations) and get a scoped `#[allow]`.
No violations: `unexpected_cfgs` is already warn-by-default, so this only
records the workspace policy explicitly.
Drops an unused lifetime parameter from `binary_apply`. The 49 violations
in the flatbuffers-generated `arrow-ipc/src/gen/` modules are allowed in
`gen/mod.rs`, which `regen.sh` leaves alone.
All violations were leftover `extern crate` statements in benches and
examples, which edition 2018 and later do not need. Applied with
`cargo clippy --fix`.
`elided_lifetimes_in_paths` has to be allowed explicitly since it is part
of `rust_2018_idioms`; `trivial_casts` and `unused_qualifications` are
`allow` by default and are listed only to record the decision.
All 41 violations are in the flatbuffers-generated `arrow-ipc/src/gen/`
modules, so they are allowed in `gen/mod.rs`, which `regen.sh` leaves
alone. No hand-written code needed changing.
`expect` fails if the lint stops firing, so these cannot silently go stale.

`bit_util.rs` could not use `expect`: its `from_bitpacked!` macro is
instantiated for four types and the cast is only trivial for `u64`, so the
expectation was unfulfilled for the other three. `u64` is now written out by
hand without a cast, which removes the need for any attribute.
`clippy::collapsible_if` is deny-by-default in CI and has been failing on
`main` since apache#10409; the nested `if let` is now a let-chain.
@Jefffrey
Jefffrey merged commit 6dc6432 into apache:main Aug 5, 2026
38 checks passed
@Jefffrey

Jefffrey commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

thanks @emilk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate arrow-arith arrow-array arrow-avro arrow-avro crate arrow-cast arrow-ipc arrow-string development-process Related to development process of arrow-rs parquet Changes to the parquet crate parquet-derive parquet_derive crate parquet-variant parquet-variant* crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants