diff options
author | 2021-04-03 20:30:34 +0300 | |
---|---|---|
committer | 2021-07-09 18:44:19 +0300 | |
commit | e4319de3d526285381f5cc53e14f9a17d123a81a (patch) | |
tree | b8ed1d60401f508f97e8f4cf151b295f11b79d24 /macros/src/codegen/timer_queue.rs | |
parent | c67657371b9f27353caae8a8ccf6e94cd0f25110 (diff) | |
download | rtic-e4319de3d526285381f5cc53e14f9a17d123a81a.tar.gz rtic-e4319de3d526285381f5cc53e14f9a17d123a81a.tar.zst rtic-e4319de3d526285381f5cc53e14f9a17d123a81a.zip |
const generics
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>>); |