# HG changeset patch
# User alfadur
# Date 1564787647 -10800
# Node ID 3bb3fe1cf87c2f1780d9a8f5b96aa335487689f3
# Parent  16bd389fc7350e89ae09302aff01054f3704c4fc
fix gear lookup allocated on stack

diff -r 16bd389fc735 -r 3bb3fe1cf87c rust/hwphysics/src/common.rs
--- a/rust/hwphysics/src/common.rs	Sat Aug 03 01:13:45 2019 +0300
+++ b/rust/hwphysics/src/common.rs	Sat Aug 03 02:14:07 2019 +0300
@@ -108,13 +108,13 @@
 }
 
 pub struct GearDataLookup<T> {
-    lookup: [LookupEntry<T>; u16::max_value() as usize],
+    lookup: Box<[LookupEntry<T>]>,
 }
 
 impl<T: Default + Copy> GearDataLookup<T> {
     pub fn new() -> Self {
         Self {
-            lookup: [LookupEntry::<T>::default(); u16::max_value() as usize],
+            lookup: Vec::with_capacity(u16::max_value() as usize).into_boxed_slice()
         }
     }
 }