rust/hwphysics/src/common.rs
changeset 15288 0f734fa371e1
parent 15287 3bb3fe1cf87c
child 15380 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(),
         }
     }
 }