Skip to content

Commit

Permalink
Cleanup ArrayData::buffers (#4583)
Browse files Browse the repository at this point in the history
* Cleanup ArrayData::buffers

* Hide from docs

* Review feedback
  • Loading branch information
tustvold authored Aug 1, 2023
1 parent a2e2fa7 commit a5d9118
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 102 deletions.
13 changes: 7 additions & 6 deletions arrow-data/src/data/mod.rs → arrow-data/src/data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ use std::sync::Arc;

use crate::equal;

mod buffers;
pub use buffers::*;
/// A collection of [`Buffer`]
#[doc(hidden)]
#[deprecated(note = "Use [Buffer]")]
pub type Buffers<'a> = &'a [Buffer];

#[inline]
pub(crate) fn contains_nulls(
Expand Down Expand Up @@ -345,10 +347,9 @@ impl ArrayData {
&self.data_type
}

/// Returns the [`Buffers`] storing data for this [`ArrayData`]
pub fn buffers(&self) -> Buffers<'_> {
// In future ArrayData won't store data contiguously as `Vec<Buffer>` (#1799)
Buffers::from_slice(&self.buffers)
/// Returns the [`Buffer`] storing data for this [`ArrayData`]
pub fn buffers(&self) -> &[Buffer] {
&self.buffers
}

/// Returns a slice of children [`ArrayData`]. This will be non
Expand Down
96 changes: 0 additions & 96 deletions arrow-data/src/data/buffers.rs

This file was deleted.

0 comments on commit a5d9118

Please sign in to comment.