diff options
author | 2023-01-07 14:26:55 +0100 | |
---|---|---|
committer | 2023-03-01 00:31:08 +0100 | |
commit | 76595b7aedd2a14aea8569b75fabe62120f93230 (patch) | |
tree | 5b94ff5b348a57347066e97f1bac8dda1d716b80 /macros/src/codegen/shared_resources.rs | |
parent | b054e871d486e8eb35e3c98a73652640238c5e7d (diff) | |
download | rtic-76595b7aedd2a14aea8569b75fabe62120f93230.tar.gz rtic-76595b7aedd2a14aea8569b75fabe62120f93230.tar.zst rtic-76595b7aedd2a14aea8569b75fabe62120f93230.zip |
All codegen is now explicit
Diffstat (limited to 'macros/src/codegen/shared_resources.rs')
-rw-r--r-- | macros/src/codegen/shared_resources.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/macros/src/codegen/shared_resources.rs b/macros/src/codegen/shared_resources.rs index 5c54fb99..19fd13fe 100644 --- a/macros/src/codegen/shared_resources.rs +++ b/macros/src/codegen/shared_resources.rs @@ -5,15 +5,7 @@ use quote::quote; use std::collections::HashMap; /// Generates `static` variables and shared resource proxies -pub fn codegen( - app: &App, - analysis: &Analysis, -) -> ( - // mod_app -- the `static` variables behind the proxies - Vec<TokenStream2>, - // mod_resources -- the `resources` module - TokenStream2, -) { +pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 { let mut mod_app = vec![]; let mut mod_resources = vec![]; @@ -183,5 +175,9 @@ pub fn codegen( )); } - (mod_app, mod_resources) + quote!( + #(#mod_app)* + + #mod_resources + ) } |