From b120382dd4c61d0e29809f423624249ce81ebd0f Mon Sep 17 00:00:00 2001 From: Paul Hauner Date: Wed, 17 Mar 2021 19:09:45 +1100 Subject: [PATCH] Fix default impl --- consensus/ssz_types/src/fixed_vector.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consensus/ssz_types/src/fixed_vector.rs b/consensus/ssz_types/src/fixed_vector.rs index 01173e6596c..9ae0d06bab9 100644 --- a/consensus/ssz_types/src/fixed_vector.rs +++ b/consensus/ssz_types/src/fixed_vector.rs @@ -114,10 +114,10 @@ impl Into> for FixedVector { } } -impl Default for FixedVector { +impl Default for FixedVector { fn default() -> Self { Self { - vec: Vec::default(), + vec: (0..N::to_usize()).map(|_| T::default()).collect(), _phantom: PhantomData, } }