aboutsummaryrefslogtreecommitdiff
path: root/src/di_container/asynchronous/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/di_container/asynchronous/mod.rs')
-rw-r--r--src/di_container/asynchronous/mod.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/di_container/asynchronous/mod.rs b/src/di_container/asynchronous/mod.rs
index e651d81..827364d 100644
--- a/src/di_container/asynchronous/mod.rs
+++ b/src/di_container/asynchronous/mod.rs
@@ -299,7 +299,9 @@ impl AsyncDIContainer
}
})?;
- Ok(SomePtr::ThreadsafeFactory(factory(self.clone()).into()))
+ Ok(SomePtr::ThreadsafeFactory(
+ factory.call(self.clone()).into(),
+ ))
}
#[cfg(feature = "factory")]
AsyncProvidable::DefaultFactory(binding) => {
@@ -315,7 +317,7 @@ impl AsyncDIContainer
DefaultFactoryFn<Interface>,
>(binding, "default factory")?;
- Ok(SomePtr::Transient(default_factory(self.clone())()))
+ Ok(SomePtr::Transient(default_factory.call(self.clone())()))
}
#[cfg(feature = "factory")]
AsyncProvidable::AsyncDefaultFactory(binding) => {
@@ -337,7 +339,7 @@ impl AsyncDIContainer
)?;
Ok(SomePtr::Transient(
- async_default_factory(self.clone())().await,
+ async_default_factory.call(self.clone())().await,
))
}
}