emilk opened a new pull request, #10935:
URL: https://github.com/apache/arrow-rs/pull/10935
# Rationale for this change
Five lints from the `pedantic` allow-list in the root `Cargo.toml` are worth
turning on: two guard raw-pointer correctness, one guards against reading
bindings that claim to be unused, and two improve readability and test
output.
All five have few enough violations to fix in one pass.
# What changes are included in this PR?
One commit per lint, each with the lint plus its fixes:
* `borrow_as_ptr` — `&mut x as *mut _` materializes a `&mut` first; the FFI
stream code now uses `&raw mut x`.
* `cast_ptr_alignment` — the five byte-pointer-to-`u64`/`i64` casts now
document why they are sound (unaligned access, or a 64-byte-aligned
buffer).
* `used_underscore_binding` — dropped underscores from bindings that are
read.
The two conditionally-used parameters keep theirs and get a feature-gated
`expect`.
* `manual_assert_eq` — `assert_eq!`/`assert_ne!` print both operands on
failure.
* `redundant_else` — dropped `else` after diverging blocks.
No behavior changes.
# Are these changes tested?
Covered by existing tests. `cargo clippy --workspace --all-targets` is clean
with and without `--all-features`.
# Are there any user-facing changes?
No.
--
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]