diff --git a/src/array/mod.rs b/src/array/mod.rs index bcb05115..ee9a940a 100644 --- a/src/array/mod.rs +++ b/src/array/mod.rs @@ -82,13 +82,6 @@ impl_array_type!(Option, FixedSizePrimitiveArray); impl_array_type!((), NullArray<(), false, Buffer>); impl_array_type!(Option<()>, NullArray<(), true, Buffer>); -impl ArrayType for (T,) { - type Array = FixedSizePrimitiveArray<(T,), false, Buffer>; -} -impl ArrayType for Option<(T,)> { - type Array = FixedSizePrimitiveArray<(T,), true, Buffer>; -} - impl ArrayType for [T; N] { type Array = FixedSizePrimitiveArray<[T; N], false, Buffer>; } diff --git a/src/fixed_size.rs b/src/fixed_size.rs index 17460314..d8d800cc 100644 --- a/src/fixed_size.rs +++ b/src/fixed_size.rs @@ -1,7 +1,7 @@ //! Subtrait for fixed-size types. use crate::array::ArrayType; -use std::fmt::Debug; +use std::{fmt::Debug, mem}; /// Subtrait for fixed-size types. /// @@ -13,7 +13,7 @@ use std::fmt::Debug; #[cfg(not(feature = "arrow-buffer"))] pub trait FixedSize: ArrayType + Copy + Debug + Sized + sealed::Sealed + 'static { /// The fixed-size of this type in bytes. - const SIZE: usize = std::mem::size_of::(); + const SIZE: usize = mem::size_of::(); } #[cfg(feature = "arrow-buffer")] @@ -42,7 +42,6 @@ impl FixedSize for f32 {} impl FixedSize for f64 {} impl FixedSize for () {} -impl FixedSize for (T,) {} impl FixedSize for [T; N] {} @@ -61,7 +60,6 @@ mod tests { #[test] fn size() { assert_eq!(<()>::SIZE, 0); - assert_eq!(<(u8,)>::SIZE, 1); assert_eq!(u8::SIZE, 1); assert_eq!(<[u16; 21]>::SIZE, 42); assert_eq!(<[u8; 1234]>::SIZE, 1234);