mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
RA fixes
This commit is contained in:
parent
843fd42e20
commit
b1d499a744
1 changed files with 3 additions and 0 deletions
|
@ -18,13 +18,16 @@ pub fn codegen(app: &App, analysis: &Analysis, extra: &Extra) -> Vec<TokenStream
|
||||||
let prio_name = util::internal_task_ident(name, "PRIORITY");
|
let prio_name = util::internal_task_ident(name, "PRIORITY");
|
||||||
|
|
||||||
items.push(quote!(
|
items.push(quote!(
|
||||||
|
#[allow(non_camel_case_types)]
|
||||||
type #type_name = impl core::future::Future + 'static;
|
type #type_name = impl core::future::Future + 'static;
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
static #exec_name:
|
static #exec_name:
|
||||||
rtic::RacyCell<rtic::export::executor::AsyncTaskExecutor<#type_name>> =
|
rtic::RacyCell<rtic::export::executor::AsyncTaskExecutor<#type_name>> =
|
||||||
rtic::RacyCell::new(rtic::export::executor::AsyncTaskExecutor::new());
|
rtic::RacyCell::new(rtic::export::executor::AsyncTaskExecutor::new());
|
||||||
|
|
||||||
// The executors priority, this can be any value - we will overwrite it when we
|
// The executors priority, this can be any value - we will overwrite it when we
|
||||||
// start a task
|
// start a task
|
||||||
|
#[allow(non_upper_case_globals)]
|
||||||
static #prio_name: rtic::RacyCell<rtic::export::Priority> =
|
static #prio_name: rtic::RacyCell<rtic::export::Priority> =
|
||||||
unsafe { rtic::RacyCell::new(rtic::export::Priority::new(0)) };
|
unsafe { rtic::RacyCell::new(rtic::export::Priority::new(0)) };
|
||||||
));
|
));
|
||||||
|
|
Loading…
Reference in a new issue