Fix macro if user crate is not using feature(const_in_array_repeat_expressions)
This commit is contained in:
parent
67c03e1a38
commit
465ca9086d
@ -102,7 +102,8 @@ pub fn task(args: TokenStream, item: TokenStream) -> TokenStream {
|
|||||||
#visibility fn #name(#args) -> ::embassy::executor::SpawnToken<#impl_ty> {
|
#visibility fn #name(#args) -> ::embassy::executor::SpawnToken<#impl_ty> {
|
||||||
#task_fn
|
#task_fn
|
||||||
type F = #impl_ty;
|
type F = #impl_ty;
|
||||||
static POOL: [::embassy::executor::Task<F>; #pool_size] = [::embassy::executor::Task::new(); #pool_size];
|
const NEW_TASK: ::embassy::executor::Task<F> = ::embassy::executor::Task::new();
|
||||||
|
static POOL: [::embassy::executor::Task<F>; #pool_size] = [NEW_TASK; #pool_size];
|
||||||
unsafe { ::embassy::executor::Task::spawn(&POOL, move || task(#arg_names)) }
|
unsafe { ::embassy::executor::Task::spawn(&POOL, move || task(#arg_names)) }
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user