Skip to content

Commit

Permalink
chore: cargo doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikkon committed Mar 31, 2024
1 parent 71472d4 commit a3e53db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions arrow-array/src/builder/generic_list_view_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use arrow_schema::{Field, FieldRef};
use crate::builder::ArrayBuilder;
use crate::{ArrayRef, GenericListViewArray, OffsetSizeTrait};

/// Builder for [`GenericListArray`]
/// Builder for [`GenericListViewArray`]
///
#[derive(Debug)]
pub struct GenericListViewBuilder<OffsetSize: OffsetSizeTrait, T: ArrayBuilder> {
Expand All @@ -44,13 +44,13 @@ impl<O: OffsetSizeTrait, T: ArrayBuilder + Default> Default for GenericListViewB
}

impl<OffsetSize: OffsetSizeTrait, T: ArrayBuilder> GenericListViewBuilder<OffsetSize, T> {
/// Creates a new [`GenericListBuilder`] from a given values array builder
/// Creates a new [`GenericListViewBuilder`] from a given values array builder
pub fn new(values_builder: T) -> Self {
let capacity = values_builder.len();
Self::with_capacity(values_builder, capacity)
}

/// Creates a new [`GenericListBuilder`] from a given values array builder
/// Creates a new [`GenericListViewBuilder`] from a given values array builder
/// `capacity` is the number of items to pre-allocate space for in this builder
pub fn with_capacity(values_builder: T, capacity: usize) -> Self {
let offsets_builder = BufferBuilder::<OffsetSize>::new(capacity);
Expand All @@ -64,7 +64,7 @@ impl<OffsetSize: OffsetSizeTrait, T: ArrayBuilder> GenericListViewBuilder<Offset
}
}

/// Override the field passed to [`GenericListArray::new`]
/// Override the field passed to [`GenericListViewArray::new`]
///
/// By default a nullable field is created with the name `item`
///
Expand Down Expand Up @@ -154,7 +154,7 @@ impl<OffsetSize: OffsetSizeTrait, T: ArrayBuilder> GenericListViewBuilder<Offset
self.extend(std::iter::once(Some(i)))
}

/// Append a null to this [`GenericListBuilder`]
/// Append a null to this [`GenericListViewBuilder`]
///
/// See [`Self::append_value`] for an example use.
#[inline]
Expand All @@ -164,7 +164,7 @@ impl<OffsetSize: OffsetSizeTrait, T: ArrayBuilder> GenericListViewBuilder<Offset
self.null_buffer_builder.append_null();
}

/// Appends an optional value into this [`GenericListBuilder`]
/// Appends an optional value into this [`GenericListViewBuilder`]
///
/// If `Some` calls [`Self::append_value`] otherwise calls [`Self::append_null`]
#[inline]
Expand Down Expand Up @@ -198,7 +198,7 @@ impl<OffsetSize: OffsetSizeTrait, T: ArrayBuilder> GenericListViewBuilder<Offset
GenericListViewArray::new(field, offsets, sizes, values ,nulls)
}

/// Builds the [`GenericListArray`] without resetting the builder.
/// Builds the [`GenericListViewArray`] without resetting the builder.
pub fn finish_cloned(&self) -> GenericListViewArray<OffsetSize> {
let values = self.values_builder.finish_cloned();
let nulls = self.null_buffer_builder.finish_cloned();
Expand Down
2 changes: 1 addition & 1 deletion arrow-buffer/src/buffer/size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl<O: ArrowNativeType> SizeBuffer<O> {
Self(self.0.slice(offset, len.saturating_add(1)))
}

/// Returns true if this [`OffsetBuffer`] is equal to `other`, using pointer comparisons
/// Returns true if this [`ScalarBuffer`] is equal to `other`, using pointer comparisons
/// to determine buffer equality. This is cheaper than `PartialEq::eq` but may
/// return false when the arrays are logically equal
#[inline]
Expand Down

0 comments on commit a3e53db

Please sign in to comment.