Skip to content

Commit

Permalink
Call .len() from FZS code
Browse files Browse the repository at this point in the history
  • Loading branch information
sffc committed Jun 10, 2022
1 parent bfd450f commit c548800
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/zerovec/src/varzerovec/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c548800

Please sign in to comment.