chloro-pn commented on PR #6178:
URL: https://github.com/apache/arrow-rs/pull/6178#issuecomment-2275866329

   by the way :
   ```
       /// Extends the buffer with a new item, without checking for sufficient 
capacity
       /// # Safety
       /// Caller must ensure that the capacity()-len()>=`size_of<T>`()
       #[inline]
       pub unsafe fn push_unchecked<T: ToByteSlice>(&mut self, item: T) {
           let additional = std::mem::size_of::<T>();
           let src = item.to_byte_slice().as_ptr();
           let dst = self.data.as_ptr().add(self.len);
           std::ptr::copy_nonoverlapping(src, dst, additional);
           self.len += additional;
       }
   ```
   The type T of `item` here cannot be a slice type. If we want to increase the 
ability of this function to handle slice types, it may involve incompatible 
modifications.


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