emilk opened a new pull request, #10755:
URL: https://github.com/apache/arrow-rs/pull/10755
# Which issue does this PR close?
- Part of the work to enable more `clippy::pedantic` lints (see #10727).
# Rationale for this change
`clippy::missing_panics_doc` had ~140 violations. This clears them so the
lint can be turned on, and removes the panic paths that could never fire
instead of documenting them.
# What changes are included in this PR?
One commit per kind of change:
* `refactor: remove unreachable panics` - replace `unwrap`/`expect` calls
that
cannot fail with non-panicking equivalents
* `docs: document the panics of public functions` - add `# Panics` sections
* `chore: mark unreachable panics with #[expect]` - for the cases where
removing the `unwrap` would need real restructuring
* `chore: skip missing_panics_doc for tests and benches`
The lint itself is not enabled here; that comes with the rest of the
pedantic lints.
# Are these changes tested?
Covered by the existing tests. Verified with
`cargo clippy --workspace --all-features --all-targets` with
`missing_panics_doc = "warn"` added locally.
# Are there any user-facing changes?
Documentation only, plus these small behavior changes:
* `Writer::into_inner` (arrow-csv) and
`BooleanBufferBuilder::truncate`/`append_n`
no longer panic on an empty buffer
* `RunEndBuffer::get_physical_index` compares in `usize`, so it no longer
truncates large logical indices for small run-end types
No API changes.
--
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]