emilk opened a new pull request, #10760:
URL: https://github.com/apache/arrow-rs/pull/10760

   # Which issue does this PR close?
   
   - Part of https://github.com/apache/arrow-rs/issues/10553
   
   # Rationale for this change
   
   Part 3 of 4, splitting out the `clippy::missing_panics_doc` work.
   **Stacked on https://github.com/apache/arrow-rs/pull/10759** - the diff shown
   here includes #10755 and #10759, so review only the commits after
   `refactor: remove two more unreachable unwraps in arrow-ipc`.
   
   1. #10755 - return errors from fallible functions
   2. #10759 - remove unreachable panics
   3. **this PR** - document the panics that genuinely remain
   4. `#[expect]` the unreachable ones, so the lint can be turned on
   
   After the first two PRs, what is left is panics that are real and that the
   function cannot report any other way. Those get a `# Panics` section.
   
   # What changes are included in this PR?
   
   * `# Panics` sections on the public functions that can still panic, including
     the ones that only panic under the `force_validate` feature
   * four of them say *why* the panic is not an error, so the reader does not 
have
     to wonder: `try_for_each_valid_idx` takes the caller's error type and so 
has no
     error value to build, the integration-test JSON readers parse fixtures 
where
     malformed input is a broken test, and the two Flight scenarios assert on 
the
     server's responses by design
   * `arrow-csv`'s `Writer::into_inner` documents its panic honestly. A 
successful
     `write` flushes, but a `write` that returned an error leaves rows 
buffered, and
     the flush inside `into_inner` can then fail. It returns `W`, so there is
     nowhere to report that
   * `arrow::util::test_util` and `arrow::util::bench_util` are public, so their
     module docs say the helpers panic on invalid input
   * the `# Panics` sections go before `#[inline]`, `#[deprecated]` and
     `#[proc_macro_derive]`, rather than after, so the doc block stays in one 
piece
   * closes an unterminated doc code fence in `PrimitiveDictionaryBuilder`
   
   # Are these changes tested?
   
   Documentation only. `cargo doc --workspace --all-features` is clean.
   
   # Are there any user-facing changes?
   
   Documentation only.
   


-- 
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]

Reply via email to