fixedvec-rs
fixedvec-rs copied to clipboard
Can't use FixedVec type in lazy_static
I am attempting to declare a FixedVec in a lazy_static! declaration. However, I repeatedly keep getting error 0106. I have tried various ways of initializing it; right now I have this code:
static SPACE: [(Option::<char>, Option::<KeyCode>); 512] = {
alloc_stack!([(Option::<char>, Option::<KeyCode>); 512])
};
And then this:
lazy_static! {
static ref KEY_QUEUE: Mutex<FixedVec> =
Mutex::new(FixedVec::new(SPACE));
//...
However, this does not seem to work. I have tried declaring the type that the vec will hold as though I were declaring a normal Vec<>, however tha didn't work either. How exactly would I go about this?