From c54880043961abd4e2421df2ac691eec1b529bde Mon Sep 17 00:00:00 2001 From: "Shane F. Carr" Date: Fri, 10 Jun 2022 00:31:21 -0700 Subject: [PATCH] Call .len() from FZS code --- utils/zerovec/src/varzerovec/components.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/zerovec/src/varzerovec/components.rs b/utils/zerovec/src/varzerovec/components.rs index 7528514d803..83977a334d9 100644 --- a/utils/zerovec/src/varzerovec/components.rs +++ b/utils/zerovec/src/varzerovec/components.rs @@ -153,13 +153,13 @@ impl<'a, T: VarULE + ?Sized> VarZeroVecComponents<'a, T> { /// Get the number of elements in this vector #[inline] pub fn len(self) -> usize { - self.indices_slice().len() + self.indices.len() } /// Returns `true` if the vector contains no elements. #[inline] pub fn is_empty(self) -> bool { - self.indices_slice().is_empty() + self.indices.is_empty() } /// Get the idx'th element out of this slice. Returns `None` if out of bounds.