From e3a7edf515ad18dd57308488251f9b33fa50efbd Mon Sep 17 00:00:00 2001 From: Nicholas Gates Date: Sat, 6 Apr 2024 21:58:50 +0100 Subject: [PATCH] Validity --- vortex-array2/src/array/bool/mod.rs | 2 +- vortex-array2/src/array/primitive/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vortex-array2/src/array/bool/mod.rs b/vortex-array2/src/array/bool/mod.rs index d171ffbb5f..b8ee9e8e22 100644 --- a/vortex-array2/src/array/bool/mod.rs +++ b/vortex-array2/src/array/bool/mod.rs @@ -31,9 +31,9 @@ impl BoolMetadata { } // TODO(ngates): I think this could be a struct? +#[allow(clippy::len_without_is_empty)] pub trait BoolArray { fn buffer(&self) -> &Buffer; - #[allow(clippy::len_without_is_empty)] fn len(&self) -> usize; fn validity(&self) -> Option; } diff --git a/vortex-array2/src/array/primitive/mod.rs b/vortex-array2/src/array/primitive/mod.rs index d0ab1fe698..570130689c 100644 --- a/vortex-array2/src/array/primitive/mod.rs +++ b/vortex-array2/src/array/primitive/mod.rs @@ -29,11 +29,11 @@ impl PrimitiveMetadata { } } +#[allow(clippy::len_without_is_empty)] pub trait PrimitiveArray { fn dtype(&self) -> &DType; fn ptype(&self) -> PType; fn buffer(&self) -> &Buffer; - #[allow(clippy::len_without_is_empty)] fn len(&self) -> usize { self.buffer().len() / self.ptype().byte_width() }