mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-14 10:22:38 +00:00
Add progress on state_processing fixed-len update
This commit is contained in:
@@ -17,6 +17,16 @@ where
|
||||
_phantom: PhantomData<N>,
|
||||
}
|
||||
|
||||
impl<T, N: Unsigned> FixedLenVec<T, N> {
|
||||
pub fn len(&self) -> usize {
|
||||
self.vec.len()
|
||||
}
|
||||
|
||||
pub fn capacity() -> usize {
|
||||
N::to_usize()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Default, N: Unsigned> From<Vec<T>> for FixedLenVec<T, N> {
|
||||
fn from(mut vec: Vec<T>) -> Self {
|
||||
dbg!(Self::capacity());
|
||||
@@ -44,12 +54,6 @@ impl<T, N: Unsigned> Default for FixedLenVec<T, N> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, N: Unsigned> FixedLenVec<T, N> {
|
||||
pub fn capacity() -> usize {
|
||||
N::to_usize()
|
||||
}
|
||||
}
|
||||
|
||||
impl<T, N: Unsigned, I: SliceIndex<[T]>> Index<I> for FixedLenVec<T, N> {
|
||||
type Output = I::Output;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user