There was an error while loading. Please reload this page.
1 parent 6477a2c commit 2331294Copy full SHA for 2331294
1 file changed
vortex-buffer/src/bit/buf_mut.rs
@@ -119,11 +119,7 @@ impl BitBufferMut {
119
120
/// Creates a `BitBufferMut` from a [`BitBuffer`] by copying all of the data over.
121
pub fn copy_from(bit_buffer: &BitBuffer) -> Self {
122
- let allocator = bit_buffer
123
- .inner()
124
- .allocator()
125
- .unwrap_or_else(BufferAllocatorRef::statically_allocated);
126
- Self::copy_from_in(bit_buffer, allocator)
+ Self::copy_from_in(bit_buffer, bit_buffer.inner().allocator().clone())
127
}
128
129
/// Copies a bit buffer with the provided allocator.
@@ -184,7 +180,7 @@ impl BitBufferMut {
184
180
185
181
186
182
/// Returns the allocator that owns this buffer.
187
- pub fn allocator(&self) -> BufferAllocatorRef {
183
+ pub fn allocator(&self) -> &BufferAllocatorRef {
188
self.buffer.allocator()
189
190
0 commit comments