alamb commented on code in PR #6300:
URL: https://github.com/apache/arrow-rs/pull/6300#discussion_r1734512162
##########
arrow-buffer/src/buffer/mutable.rs:
##########
@@ -341,7 +341,10 @@ impl MutableBuffer {
}
#[inline]
- pub(super) fn into_buffer(self) -> Buffer {
+ pub(super) fn into_buffer(mut self) -> Buffer {
+ // Don't leak our extra capacity into the final buffer.
+ self.shrink_to_fit();
Review Comment:
Does this force a copy in the case where the capacity is larger that the
actual need?
--
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]