Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions arrow-buffer/src/buffer/immutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@ pub struct Buffer {
length: usize,
}

impl Default for Buffer {
#[inline]
fn default() -> Self {
MutableBuffer::default().into()
}
}

impl PartialEq for Buffer {
fn eq(&self, other: &Self) -> bool {
self.as_slice().eq(other.as_slice())
Expand Down
2 changes: 1 addition & 1 deletion arrow-buffer/src/buffer/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ use std::ops::Deref;
/// let sliced = buffer.slice(1, 2);
/// assert_eq!(&sliced, &[2, 3]);
/// ```
#[derive(Clone)]
#[derive(Clone, Default)]
pub struct ScalarBuffer<T: ArrowNativeType> {
/// Underlying data buffer
buffer: Buffer,
Expand Down
Loading