rust/hwphysics/src/common.rs
changeset 15309 0f734fa371e1
parent 15308 3bb3fe1cf87c
child 15401 6e3e5be8b2e2
--- a/rust/hwphysics/src/common.rs	Sat Aug 03 02:14:07 2019 +0300
+++ b/rust/hwphysics/src/common.rs	Sat Aug 03 02:51:19 2019 +0300
@@ -114,7 +114,7 @@
 impl<T: Default + Copy> GearDataLookup<T> {
     pub fn new() -> Self {
         Self {
-            lookup: Vec::with_capacity(u16::max_value() as usize).into_boxed_slice()
+            lookup: vec![LookupEntry::default(); u16::max_value() as usize].into_boxed_slice(),
         }
     }
 }