SeeRightThroughMe opened a new pull request, #5857:
URL: https://github.com/apache/arrow-rs/pull/5857
# Which issue does this PR close?
N/A
# Rationale for this change
Schema::field does not indicate that it panics in the current docs. It does
panic though (not that this is particularly surprising!).
Here's an example that will panic:
```
use arrow::datatypes::SchemaBuilder;
fn main() {
let mut builder = SchemaBuilder::new();
let schema = builder.finish();
let my_field = schema.field(2); // <-- Panics here because index OOB.
}
```
# What changes are included in this PR?
Just a docstring.
# Are there any user-facing changes?
Nope, but perhaps in future, field should either return a result, or we add
a try_field function that returns a result (to prevent people needing to change
code relying on Schema::field already)
--
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]