andygrove commented on a change in pull request #9624:
URL: https://github.com/apache/arrow/pull/9624#discussion_r586449677



##########
File path: rust/arrow/src/array/array_binary.rs
##########
@@ -89,7 +89,7 @@ impl<OffsetSize: BinaryOffsetSizeTrait> 
GenericBinaryArray<OffsetSize> {
         // pointer alignment & location is ensured by RawPtrBox
         // buffer bounds/offset is ensured by the value_offset invariants
         std::slice::from_raw_parts(
-            self.value_data.as_ptr().offset(start.to_isize()),
+            self.value_data.as_ptr().offset(start.to_isize().unwrap()),

Review comment:
       If these calls to `unwrap` can't be avoided, could we at least document 
why they are needed/safe?




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to