viirya commented on code in PR #3920:
URL: https://github.com/apache/arrow-rs/pull/3920#discussion_r1148138174


##########
arrow-buffer/src/buffer/mutable.rs:
##########
@@ -67,14 +68,21 @@ impl MutableBuffer {
 
     /// Allocate a new [MutableBuffer] with initial capacity to be at least 
`capacity`.
     #[inline]
-    #[allow(deprecated)]
     pub fn with_capacity(capacity: usize) -> Self {
         let capacity = bit_util::round_upto_multiple_of_64(capacity);
-        let ptr = alloc::allocate_aligned(capacity);
+        let layout = Layout::from_size_align(capacity, ALIGNMENT).unwrap();

Review Comment:
   Do we still need `round_upto_multiple_of_64`? `from_size_align` seems also 
rounding `capacity`?



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