equal
deleted
inserted
replaced
106 self.value = value; |
106 self.value = value; |
107 } |
107 } |
108 } |
108 } |
109 |
109 |
110 pub struct GearDataLookup<T> { |
110 pub struct GearDataLookup<T> { |
111 lookup: [LookupEntry<T>; u16::max_value() as usize], |
111 lookup: Box<[LookupEntry<T>]>, |
112 } |
112 } |
113 |
113 |
114 impl<T: Default + Copy> GearDataLookup<T> { |
114 impl<T: Default + Copy> GearDataLookup<T> { |
115 pub fn new() -> Self { |
115 pub fn new() -> Self { |
116 Self { |
116 Self { |
117 lookup: [LookupEntry::<T>::default(); u16::max_value() as usize], |
117 lookup: Vec::with_capacity(u16::max_value() as usize).into_boxed_slice() |
118 } |
118 } |
119 } |
119 } |
120 } |
120 } |
121 |
121 |
122 impl<T> GearDataLookup<T> { |
122 impl<T> GearDataLookup<T> { |