Skip to content

Commit

Permalink
Simplify &Array delegation
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold committed Jul 22, 2022
1 parent b06996b commit 8948a9d
Showing 1 changed file with 1 addition and 51 deletions.
52 changes: 1 addition & 51 deletions arrow/src/array/array.rs
Expand Up @@ -307,57 +307,7 @@ impl<'a, T: Array> Array for &'a T {
}

fn into_data(self) -> ArrayData {
self.data().clone()
}

fn data_ref(&self) -> &ArrayData {
T::data_ref(self)
}

fn data_type(&self) -> &DataType {
T::data_type(self)
}

fn slice(&self, offset: usize, length: usize) -> ArrayRef {
T::slice(self, offset, length)
}

fn len(&self) -> usize {
T::len(self)
}

fn is_empty(&self) -> bool {
T::is_empty(self)
}

fn offset(&self) -> usize {
T::offset(self)
}

fn is_null(&self, index: usize) -> bool {
T::is_null(self, index)
}

fn is_valid(&self, index: usize) -> bool {
T::is_valid(self, index)
}

fn null_count(&self) -> usize {
T::null_count(self)
}

fn get_buffer_memory_size(&self) -> usize {
T::get_buffer_memory_size(self)
}

fn get_array_memory_size(&self) -> usize {
T::get_array_memory_size(self)
}

fn to_raw(
&self,
) -> Result<(*const ffi::FFI_ArrowArray, *const ffi::FFI_ArrowSchema)> {
T::to_raw(self)
T::data(self).clone()
}
}

Expand Down

0 comments on commit 8948a9d

Please sign in to comment.