From 57a0fca0a9f6f96de3a3f3a7168c4a8bac6677df Mon Sep 17 00:00:00 2001 From: SeeRightThroughMe Date: Sat, 8 Jun 2024 12:51:49 +0100 Subject: [PATCH] Added panic message to docs. --- arrow-schema/src/schema.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arrow-schema/src/schema.rs b/arrow-schema/src/schema.rs index ede158fcf248..3bb076aa54b0 100644 --- a/arrow-schema/src/schema.rs +++ b/arrow-schema/src/schema.rs @@ -331,6 +331,10 @@ impl Schema { /// Returns an immutable reference of a specific [`Field`] instance selected using an /// offset within the internal `fields` vector. + /// + /// # Panics + /// + /// Panics if index out of bounds pub fn field(&self, i: usize) -> &Field { &self.fields[i] }