From 6a2c4025080776a386ab6dcd074fd05ae7319f9c Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 27 Sep 2023 19:55:30 +0200 Subject: fix: make dummy Injectable & AsyncInjectable impls valid --- macros/src/injectable/implementation.rs | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'macros/src') diff --git a/macros/src/injectable/implementation.rs b/macros/src/injectable/implementation.rs index 74a907e..98e0abf 100644 --- a/macros/src/injectable/implementation.rs +++ b/macros/src/injectable/implementation.rs @@ -319,20 +319,14 @@ impl InjectableImpl let generics = &self.generics; let self_type = &self.self_type; - let di_container_var = format_ident!("{}", DI_CONTAINER_VAR_NAME); - let dependency_history_var = format_ident!("{}", DEPENDENCY_HISTORY_VAR_NAME); - quote! { impl #generics syrette::interfaces::injectable::Injectable< syrette::di_container::blocking::DIContainer, - syrette::dependency_history::DependencyHistory > for #self_type { fn resolve( - #di_container_var: &std::rc::Rc< - syrette::di_container::blocking::DIContainer - >, - mut #dependency_history_var: syrette::dependency_history::DependencyHistory + _: &syrette::di_container::blocking::DIContainer, + _: syrette::dependency_history::DependencyHistory ) -> Result< syrette::ptr::TransientPtr, syrette::errors::injectable::InjectableError> @@ -349,20 +343,15 @@ impl InjectableImpl let generics = &self.generics; let self_type = &self.self_type; - let di_container_var = format_ident!("{}", DI_CONTAINER_VAR_NAME); - let dependency_history_var = format_ident!("{}", DEPENDENCY_HISTORY_VAR_NAME); - quote! { impl #generics syrette::interfaces::async_injectable::AsyncInjectable< syrette::di_container::asynchronous::AsyncDIContainer, - syrette::dependency_history::DependencyHistory > for #self_type { fn resolve<'di_container, 'fut>( - #di_container_var: &'di_container std::sync::Arc< - syrette::di_container::asynchronous::AsyncDIContainer - >, - mut #dependency_history_var: syrette::dependency_history::DependencyHistory + _: &'di_container + syrette::di_container::asynchronous::AsyncDIContainer, + _: syrette::dependency_history::DependencyHistory ) -> syrette::future::BoxFuture< 'fut, Result< -- cgit v1.2.3-18-g5258