aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/dispatchers.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2021-07-20 08:51:53 +0000
committerGravatar GitHub <noreply@github.com> 2021-07-20 08:51:53 +0000
commit78f556f9427e94e830b6ff6269bb1ac80010c5e6 (patch)
tree9db41cca23a87a9d78369c14b311d7fda9309fc0 /macros/src/codegen/dispatchers.rs
parentc67657371b9f27353caae8a8ccf6e94cd0f25110 (diff)
parentbf80035aef21dd9c84a26ed47bbd1bb4a596952f (diff)
downloadrtic-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/dispatchers.rs')
-rw-r--r--macros/src/codegen/dispatchers.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/macros/src/codegen/dispatchers.rs b/macros/src/codegen/dispatchers.rs
index ac550036..c239b0f8 100644
--- a/macros/src/codegen/dispatchers.rs
+++ b/macros/src/codegen/dispatchers.rs
@@ -42,15 +42,13 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
}
));
- let n = util::capacity_typenum(channel.capacity, true);
+ let n = util::capacity_literal(channel.capacity as usize + 1);
let rq = util::rq_ident(level);
let rq = util::mark_internal_ident(&rq);
let (rq_ty, rq_expr) = {
(
quote!(rtic::export::SCRQ<#t, #n>),
- quote!(rtic::export::Queue(unsafe {
- rtic::export::iQueue::u8_sc()
- })),
+ quote!(rtic::export::Queue::new()),
)
};