Clippy fixes

This commit is contained in:
Dario Nieuwenhuis
2021-10-18 00:55:43 +02:00
parent d81a203ee2
commit a2e7c24e00
20 changed files with 35 additions and 29 deletions

View File

@ -118,6 +118,7 @@ pub fn task(args: TokenStream, item: TokenStream) -> TokenStream {
use #embassy_path::executor::raw::TaskStorage;
#task_fn
type F = #impl_ty;
#[allow(clippy::declare_interior_mutable_const)]
const NEW_TASK: TaskStorage<F> = TaskStorage::new();
static POOL: [TaskStorage<F>; #pool_size] = [NEW_TASK; #pool_size];
unsafe { TaskStorage::spawn_pool(&POOL, move || task(#arg_names)) }