Skip to content

Commit

Permalink
fix: bound on ArrayType implementation for arrays (#123)
Browse files Browse the repository at this point in the history
The `FixedSize` bound was used when arrays were stored in
`FixedSizePrimitiveArray`.
  • Loading branch information
mbrobbel authored Dec 15, 2023
1 parent b333ab3 commit fabc404
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use crate::{
buffer::BufferType,
offset::{self, OffsetElement},
FixedSize,
};
use std::collections::VecDeque;

Expand Down Expand Up @@ -118,7 +117,7 @@ impl_array_type!(Option<f64>, FixedSizePrimitiveArray<f64, true, Buffer>);
impl_array_type!((), NullArray<(), false, Buffer>);
impl_array_type!(Option<()>, NullArray<(), true, Buffer>);

impl<T: FixedSize, const N: usize> ArrayType for [T; N] {
impl<T: ArrayType, const N: usize> ArrayType for [T; N] {
type Array<Buffer: BufferType, OffsetItem: OffsetElement, UnionLayout: UnionType> =
FixedSizeListArray<
N,
Expand All @@ -127,7 +126,7 @@ impl<T: FixedSize, const N: usize> ArrayType for [T; N] {
Buffer,
>;
}
impl<T: FixedSize, const N: usize> ArrayType for Option<[T; N]> {
impl<T: ArrayType, const N: usize> ArrayType for Option<[T; N]> {
type Array<Buffer: BufferType, OffsetItem: OffsetElement, UnionLayout: UnionType> =
FixedSizeListArray<
N,
Expand Down

0 comments on commit fabc404

Please sign in to comment.