From d8c9476372e25799224d0225bb12c9a9fe043743 Mon Sep 17 00:00:00 2001 From: Henrik Tjäder Date: Tue, 1 Sep 2020 16:12:42 +0000 Subject: Since there only will be one init/idle use .first().unwrap(), matching rtic-syntax --- macros/src/codegen/init.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'macros/src/codegen/init.rs') diff --git a/macros/src/codegen/init.rs b/macros/src/codegen/init.rs index 01074db6..94f57afb 100644 --- a/macros/src/codegen/init.rs +++ b/macros/src/codegen/init.rs @@ -27,9 +27,8 @@ pub fn codegen( // call_init -- the call to the user `#[init]` if there's one Option, ) { - //if let Some(init) = app.inits.get(&core) { if app.inits.len() > 0 { - let init = &app.inits[0]; + let init = &app.inits.first().unwrap(); let mut needs_lt = false; let name = &init.name; -- cgit v1.2.3