From 224e59112e65ce6cbafe5a87dba031dd11e936a8 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 27 Jul 2022 14:43:51 +0200 Subject: refactor: add back Intertrait tests & Rc support --- src/di_container.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/di_container.rs') diff --git a/src/di_container.rs b/src/di_container.rs index 40de948..1f7700f 100644 --- a/src/di_container.rs +++ b/src/di_container.rs @@ -9,7 +9,7 @@ use error_stack::{Report, ResultExt}; use crate::castable_factory::CastableFactory; use crate::errors::di_container::DIContainerError; use crate::interfaces::injectable::Injectable; -use crate::libs::intertrait::cast_box::CastBox; +use crate::libs::intertrait::cast::CastBox; use crate::provider::{IProvider, InjectableTypeProvider, Providable}; use crate::ptr::InterfacePtr; @@ -225,7 +225,7 @@ impl DIContainer match binding_providable { Providable::Factory(binding_factory) => { - use crate::libs::intertrait::cast_rc::CastRc; + use crate::libs::intertrait::cast::CastRc; let factory_box_result = binding_factory.cast::(); @@ -493,14 +493,14 @@ mod tests let mut mock_provider = MockProvider::new(); mock_provider.expect_provide().returning(|_| { - Ok(Providable::Factory(FactoryPtr::new(CastableFactory::new( - &|users| { + Ok(Providable::Factory(crate::ptr::FactoryPtr::new( + CastableFactory::new(&|users| { let user_manager: InterfacePtr = InterfacePtr::new(UserManager::new(users)); user_manager - }, - )))) + }), + ))) }); di_container -- cgit v1.2.3-18-g5258