aboutsummaryrefslogtreecommitdiff
path: root/src/di_container/blocking/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/di_container/blocking/mod.rs')
-rw-r--r--src/di_container/blocking/mod.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/di_container/blocking/mod.rs b/src/di_container/blocking/mod.rs
index d9efe94..d8b0d59 100644
--- a/src/di_container/blocking/mod.rs
+++ b/src/di_container/blocking/mod.rs
@@ -285,11 +285,11 @@ impl DIContainer
)),
#[cfg(feature = "factory")]
Providable::Factory(factory_binding) => {
- use crate::castable_factory::CastableFactory;
+ use crate::castable_function::CastableFunction;
let factory = factory_binding
.as_any()
- .downcast_ref::<CastableFactory<Interface, Self>>()
+ .downcast_ref::<CastableFunction<Interface, Self>>()
.ok_or_else(|| DIContainerError::CastFailed {
interface: type_name::<Interface>(),
binding_kind: "factory",
@@ -299,11 +299,11 @@ impl DIContainer
}
#[cfg(feature = "factory")]
Providable::DefaultFactory(factory_binding) => {
- use crate::castable_factory::CastableFactory;
+ use crate::castable_function::CastableFunction;
use crate::ptr::TransientPtr;
type DefaultFactoryFn<Interface> =
- CastableFactory<dyn Fn() -> TransientPtr<Interface>, DIContainer>;
+ CastableFunction<dyn Fn() -> TransientPtr<Interface>, DIContainer>;
let default_factory = factory_binding
.as_any()
@@ -517,7 +517,7 @@ mod tests
#[cfg(feature = "factory")]
fn can_get_factory()
{
- use crate::castable_factory::CastableFactory;
+ use crate::castable_function::CastableFunction;
use crate::ptr::FactoryPtr;
trait IUserManager
@@ -572,7 +572,7 @@ mod tests
let mut mock_provider = MockIProvider::new();
mock_provider.expect_provide().returning_st(|_, _| {
- Ok(Providable::Factory(FactoryPtr::new(CastableFactory::new(
+ Ok(Providable::Factory(FactoryPtr::new(CastableFunction::new(
factory_func,
))))
});
@@ -592,7 +592,7 @@ mod tests
#[cfg(feature = "factory")]
fn can_get_factory_named()
{
- use crate::castable_factory::CastableFactory;
+ use crate::castable_function::CastableFunction;
use crate::ptr::FactoryPtr;
trait IUserManager
@@ -647,7 +647,7 @@ mod tests
let mut mock_provider = MockIProvider::new();
mock_provider.expect_provide().returning_st(|_, _| {
- Ok(Providable::Factory(FactoryPtr::new(CastableFactory::new(
+ Ok(Providable::Factory(FactoryPtr::new(CastableFunction::new(
factory_func,
))))
});