From 4fd0d6b4951b08a20d5378bca75561109dc6d036 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 18 Sep 2023 22:35:58 +0200 Subject: refactor!: make the async DI container not inside a Arc BREAKING CHANGE: The async DI container is no longer inside of a Arc. This affects AsyncBindingBuilder, AsyncBindingScopeConfigurator, AsyncBindingWhenConfigurator & AsyncInjectable --- src/test_utils.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/test_utils.rs') diff --git a/src/test_utils.rs b/src/test_utils.rs index 6071cfb..491e9b4 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -138,7 +138,6 @@ pub mod subjects_async //! Test subjects. use std::fmt::Debug; - use std::sync::Arc; use async_trait::async_trait; use syrette_macros::declare_interface; @@ -187,7 +186,7 @@ pub mod subjects_async impl AsyncInjectable for UserManager { async fn resolve( - _: &Arc, + _: &DIContainerType, _dependency_history: DependencyHistory, ) -> Result, crate::errors::injectable::InjectableError> where @@ -252,7 +251,7 @@ pub mod subjects_async impl AsyncInjectable for Number { async fn resolve( - _: &Arc, + _: &DIContainerType, _dependency_history: DependencyHistory, ) -> Result, crate::errors::injectable::InjectableError> where @@ -271,8 +270,6 @@ pub mod mocks #[cfg(feature = "async")] pub mod async_provider { - use std::sync::Arc; - use async_trait::async_trait; use mockall::mock; @@ -293,7 +290,7 @@ pub mod mocks { async fn provide( &self, - di_container: &Arc, + di_container: &DIContainerT, dependency_history: DependencyHistory ) -> Result, InjectableError>; -- cgit v1.2.3-18-g5258