aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/init.rs
diff options
context:
space:
mode:
Diffstat (limited to 'macros/src/codegen/init.rs')
-rw-r--r--macros/src/codegen/init.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/macros/src/codegen/init.rs b/macros/src/codegen/init.rs
index 2aa8fb31..3b2bcd47 100644
--- a/macros/src/codegen/init.rs
+++ b/macros/src/codegen/init.rs
@@ -18,8 +18,6 @@ type CodegenResult = (
Vec<TokenStream2>,
// user_init -- the `#[init]` function written by the user
TokenStream2,
- // call_init -- the call to the user `#[init]`
- TokenStream2,
);
/// Generates support code for `#[init]` functions
@@ -63,6 +61,7 @@ pub fn codegen(app: &App, analysis: &Analysis) -> CodegenResult {
)
})
.collect();
+
root_init.push(quote! {
struct #shared {
#(#shared_resources)*
@@ -97,11 +96,7 @@ pub fn codegen(app: &App, analysis: &Analysis) -> CodegenResult {
mod_app = Some(constructor);
}
- let call_init = quote! {
- let (shared_resources, local_resources) = #name(#name::Context::new(core.into()));
- };
-
root_init.push(module::codegen(Context::Init, app, analysis));
- (mod_app, root_init, user_init, call_init)
+ (mod_app, root_init, user_init)
}