Goodbye static mut

This commit is contained in:
Emil Fresk 2021-04-08 18:25:09 +02:00
parent 43c5ad79c2
commit 6aa0fb450f
11 changed files with 145 additions and 59 deletions

View file

@ -125,7 +125,7 @@ pub fn app(app: &App, analysis: &Analysis, extra: &Extra) -> TokenStream2 {
rtic::export::interrupt::free(|_| {
use rtic::Monotonic as _;
use rtic::time::Clock as _;
if let Some(m) = unsafe{ #app_path::#ident.as_ref() } {
if let Some(m) = unsafe{ #app_path::#ident.get_mut_unchecked() } {
if let Ok(v) = m.try_now() {
v
} else {