diff options
author | 2021-07-20 08:51:53 +0000 | |
---|---|---|
committer | 2021-07-20 08:51:53 +0000 | |
commit | 78f556f9427e94e830b6ff6269bb1ac80010c5e6 (patch) | |
tree | 9db41cca23a87a9d78369c14b311d7fda9309fc0 /macros/src/codegen/timer_queue.rs | |
parent | c67657371b9f27353caae8a8ccf6e94cd0f25110 (diff) | |
parent | bf80035aef21dd9c84a26ed47bbd1bb4a596952f (diff) | |
download | rtic-78f556f9427e94e830b6ff6269bb1ac80010c5e6.tar.gz rtic-78f556f9427e94e830b6ff6269bb1ac80010c5e6.tar.zst rtic-78f556f9427e94e830b6ff6269bb1ac80010c5e6.zip |
Merge #464
464: const generics r=AfoHT a=burrbull
Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
Co-authored-by: mriise <mark.riise26@gmail.com>
Co-authored-by: Zgarbul Andrey <zgarbul.andrey@gmail.com>
Diffstat (limited to 'macros/src/codegen/timer_queue.rs')
-rw-r--r-- | macros/src/codegen/timer_queue.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/src/codegen/timer_queue.rs b/macros/src/codegen/timer_queue.rs index 9e30d100..abddbadc 100644 --- a/macros/src/codegen/timer_queue.rs +++ b/macros/src/codegen/timer_queue.rs @@ -62,12 +62,12 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea { // For future use // let doc = &format!("Timer queue for {}", monotonic_name); - let cap = app + let cap: u8 = app .software_tasks .iter() .map(|(_name, task)| task.args.capacity) .sum(); - let n = util::capacity_typenum(cap, false); + let n = util::capacity_literal(cap as usize); let tq_ty = quote!(core::mem::MaybeUninit<rtic::export::TimerQueue<#mono_type, #t, #n>>); |