waynexia commented on code in PR #6336:
URL: https://github.com/apache/arrow-rs/pull/6336#discussion_r1764722734


##########
arrow-buffer/src/buffer/mutable.rs:
##########
@@ -517,8 +674,18 @@ impl<T: ArrowNativeType> From<Vec<T>> for MutableBuffer {
         // Vec guaranteed to have a valid layout matching that of 
`Layout::array`
         // This is based on `RawVec::current_memory`
         let layout = unsafe { 
Layout::array::<T>(value.capacity()).unwrap_unchecked() };
+        let zelf = Self {
+            data,
+            len,
+            layout,
+            #[cfg(not(feature = "allocator_api"))]
+            allocator: Global,
+            #[cfg(feature = "allocator_api")]
+            allocator: *value.allocator(),

Review Comment:
   I got what you mean 
https://github.com/apache/arrow-rs/pull/6336/files#diff-371342744df1b634b0bd9d90f4fe38c1eb0096df322fd3cc2fbc513f3428046cR692-R696
   
   We should have two impl blocks indeed for different type parameters



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